server { listen 80; server_name cloud.teier.eu; return 301 https://cloud.teier.eu:443$request_uri; } server { listen 443 ssl http2; server_name cloud.teier.eu; ssl on; ssl_certificate /etc/letsencrypt/live/teier.eu/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/teier.eu/privkey.pem; location / { proxy_pass http://127.0.0.1:8081/; # Configuration for WebSockets proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; proxy_cache off; # Configuration for ServerSentEvents proxy_buffering off; # Configuration for LongPolling or if your KeepAliveInterval is longer than 60 seconds proxy_read_timeout 100s; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } }