map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen 80;
server_name ha.example.com;
root /srv/ha;
access_log /srv/log/ha-access.log;
error_log /srv/log/ha-error.log;
location / {
proxy_pass http://127.0.0.1:8123;
proxy_set_header Host $host;
# proxy_redirect http:// https://;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
}
# vim:set ft=nginx ai et ts=4 sts=4 sw=4 cc=80:EOF #