# Example nginx location block for ihasmail behind TLS termination. server { listen 443 ssl http2; server_name mail.example.com; # ssl_certificate ...; ssl_certificate_key ...; client_max_body_size 60m; location / { proxy_pass http://127.0.0.1:8080; proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; # Server-Sent Events (push notifications) proxy_buffering off; proxy_read_timeout 3600s; } }