-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathnginx.conf
50 lines (44 loc) · 1.8 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
server {
# Logs
rewrite_log on;
error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log;
location /php/ {
rewrite ^/php(.*)$ $1 break;
root /var/www/memoires-info/php/public;
fastcgi_pass php:9000;
try_files $uri =404;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
location /esp/ {
rewrite ^/esp(.*)$ $1 break;
add_header X-debug-message "uri: $uri" always;
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;
add_header X-debug-message "uri: $uri" always;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://adminer:8080/;
}
location /postgrest/ {
rewrite ^/postgrest(.*)$ $1 break;
add_header X-debug-message "uri: $uri" always;
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;
add_header X-debug-message "uri: $uri" always;
try_files $uri $uri/ /index.html;
}
}