updating configuration
This commit is contained in:
@@ -0,0 +1,30 @@
|
|||||||
|
server {
|
||||||
|
listen 80 default_server;
|
||||||
|
#listen 443 default ssl;
|
||||||
|
|
||||||
|
server_name _;
|
||||||
|
|
||||||
|
#ssl_certificate /config/keys/cert.crt;
|
||||||
|
#ssl_certificate_key /config/keys/cert.key;
|
||||||
|
|
||||||
|
client_max_body_size 0;
|
||||||
|
|
||||||
|
#letsencrypt challenge response
|
||||||
|
location ~/.well-known/acme-challenge/(.*)$ {
|
||||||
|
return 200 '$1';
|
||||||
|
}
|
||||||
|
|
||||||
|
location / {
|
||||||
|
real_ip_header X-Forwarded-For;
|
||||||
|
set_real_ip_from 0.0.0.0/0;
|
||||||
|
|
||||||
|
proxy_pass http://hass;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header X-Forwarded-For $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-Host $remote_addr;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection $connection_upgrade;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,79 @@
|
|||||||
|
upstream hass {
|
||||||
|
server %SERVER_IP%:8123;
|
||||||
|
}
|
||||||
|
upstream appdaemon {
|
||||||
|
server appdaemon:5000;
|
||||||
|
}
|
||||||
|
upstream certbot {
|
||||||
|
server %SERVER_IP%:8081;
|
||||||
|
}
|
||||||
|
|
||||||
|
upstream grafana {
|
||||||
|
server %SERVER_IP%:3000;
|
||||||
|
}
|
||||||
|
|
||||||
|
map $http_upgrade $connection_upgrade {
|
||||||
|
default upgrade;
|
||||||
|
'' close;
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
listen 443 ssl;
|
||||||
|
server_name %DOMAIN%;
|
||||||
|
|
||||||
|
#ssl on;
|
||||||
|
ssl_certificate /config/keys/live/%DOMAIN%/fullchain.pem;
|
||||||
|
ssl_certificate_key /config/keys/live/%DOMAIN%/privkey.pem;
|
||||||
|
|
||||||
|
#add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload";
|
||||||
|
|
||||||
|
#limit_conn perip 10;
|
||||||
|
|
||||||
|
#access_log off;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
real_ip_header X-Forwarded-For;
|
||||||
|
set_real_ip_from 0.0.0.0/0;
|
||||||
|
|
||||||
|
proxy_pass http://hass;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header X-Forwarded-For $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-Host $remote_addr;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection $connection_upgrade;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /api/appdaemon/ {
|
||||||
|
proxy_pass http://appdaemon;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /api/appdaemon/tags {
|
||||||
|
proxy_pass http://appdaemon;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header x-ad-access %PASS%;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /api/appdaemon/mi_scale {
|
||||||
|
proxy_pass http://appdaemon;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header x-ad-access %PASS%;
|
||||||
|
}
|
||||||
|
location /api/appdaemon/alice {
|
||||||
|
proxy_pass http://appdaemon;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header x-ad-access %PASS%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user