server { listen 80 default_server; server_name _; return 301 https://$host$request_uri; } ssl_certificate /etc/letsencrypt/live/adguard.balsillie.house-0002/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/adguard.balsillie.house-0002/privkey.pem; server { listen 443 ssl; server_name sync-admin.balsillie.house; http2 on; location / { 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; proxy_pass http://10.96.10.15:8080/; proxy_read_timeout 600s; proxy_send_timeout 600s; } } server { listen 443 ssl; server_name unifi.balsillie.house; http2 on; proxy_ssl_verify off; location /wss/ { proxy_pass https://10.96.10.17:8443; proxy_http_version 1.1; proxy_buffering off; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; proxy_read_timeout 86400; } location / { proxy_pass https://10.96.10.17:8443/; # The Unifi Controller Port proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forward-For $proxy_add_x_forwarded_for; } }