forked from museebolo/climat_guardian
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
53 lines (47 loc) · 1.96 KB
/
nginx.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
server {
# Logs
rewrite_log on;
error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log;
location /php {
root /var/www/memoires-info/php/private;
rewrite ^/php(.*)$ $1 break;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME /var/www/memoires-info/php/public/index.php;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param REQUEST_URI $uri;
fastcgi_index index.php;
fastcgi_pass php:9000;
}
location /esp/ {
rewrite ^/esp(.*)$ $1 break;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://esphome:6052/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location /adminer/ {
rewrite ^/adminer(.*)$ $1 break;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://adminer:8080/;
}
location /postgrest/ {
rewrite ^/postgrest(.*)$ $1 break;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://postg-rest:3000/;
}
location / {
root /var/www/memoires-info/html;
proxy_pass http://interface:3000;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
}
}