pid /tmp/nginx.pid; error_log /dev/stderr notice; events {} http { include /etc/nginx/mime.types; default_type application/octet-stream; access_log off; client_body_temp_path /tmp/client_body; proxy_temp_path /tmp/proxy; fastcgi_temp_path /tmp/fastcgi; uwsgi_temp_path /tmp/uwsgi; scgi_temp_path /tmp/scgi; map $server_port $client_addr { default $remote_addr; 8082 $http_x_forwarded_for; } server { listen 8082; listen 8443 ssl; server_name mail.quorate.dev; absolute_redirect off; client_max_body_size 80m; root /usr/share/nginx/html; ssl_certificate /run/tls/tls.crt; ssl_certificate_key /run/tls/tls.key; ssl_protocols TLSv1.2 TLSv1.3; location = /healthz { return 200 'ok'; } location = / { return 302 /account/; } location = /login { return 302 /account/login; } location = /account/config.json { alias /run/config/config.json; default_type application/json; add_header Cache-Control "no-store"; } location /account/ { try_files $uri $uri/ /account/index.html; } location / { proxy_pass http://127.0.0.1:8081; proxy_http_version 1.1; proxy_request_buffering off; proxy_buffering off; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $client_addr; proxy_set_header X-Forwarded-Proto https; proxy_set_header Connection ""; } } }