Basiskonfiguration
server { listen 80; listen [::]:80; server_name example.com; location / { proxy_pass http://localhost:8080/; } }
SSL
server { listen 443 ssl; server_name www.example.com; ssl_certificate www.example.com.crt; ssl_certificate_key www.example.com.key; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers HIGH:!aNULL:!MD5; ... }
Websockets
https://www.nginx.com/blog/websocket-nginx/
proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; proxy_set_header Host $host;