ansible-infra/playbooks/files/z9/configs/zigbee2mqtt/nginx/zigbee2mqtt.conf

29 lines
972 B
Plaintext
Raw Normal View History

2022-12-08 23:45:22 +01:00
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name zigbee2mqtt.ccchh.net;
2022-12-08 23:45:22 +01:00
ssl_certificate /etc/letsencrypt/live/zigbee2mqtt.ccchh.net/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/zigbee2mqtt.ccchh.net/privkey.pem;
# verify chain of trust of OCSP response using Root CA and Intermediate certs
ssl_trusted_certificate /etc/letsencrypt/live/zigbee2mqtt.ccchh.net/chain.pem;
add_header Strict-Transport-Security "max-age=63072000" always;
2022-12-08 23:45:22 +01:00
location / {
proxy_pass http://localhost:8080/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /api {
proxy_pass http://localhost:8080/api;
2022-12-08 23:45:22 +01:00
proxy_set_header Host $host;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}