-
Notifications
You must be signed in to change notification settings - Fork 0
/
taatta.nginx
29 lines (24 loc) · 1003 Bytes
/
taatta.nginx
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
server {
listen 80;
listen [::]:80;
access_log /var/log/nginx/taatta_access.log combined;
error_log /var/log/nginx/taatta_error.log error;
location /athom-smart-plug {
proxy_pass http://127.0.0.1:4050;
# remove prefix
# https://www.digitalocean.com/community/questions/how-to-reverse-proxy-for-nginx-configuration-for-subpath-in-root-folder
rewrite ^/athom-smart-plug(/.*) $1 break;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location /athom-presence-sensor {
proxy_pass http://127.0.0.1:4052;
rewrite ^/athom-presence-sensor(/.*) $1 break;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}