1 # Example NGINX configuration to proxy-pass requests
2 # to varnish, public-inbox-(httpd|netd) or any PSGI/Plack server.
3 # The daemon is assumed to be running locally on port 8001.
4 # Adjust ssl certificate paths if you use any, or remove
5 # the ssl configuration directives if you don't.
7 # Note: public-inbox-httpd and -netd both support HTTPS, but they
8 # don't support caching which Varnish provides. The recommended
11 # (nginx|any-HTTPS-proxy) <-> varnish <-> public-inbox-(httpd|netd)
16 access_log /var/log/nginx/public-inbox-httpd_access.log;
17 error_log /var/log/nginx/public-inbox-httpd_error.log;
20 proxy_set_header HOST $host;
21 proxy_set_header X-Real-IP $remote_addr;
22 proxy_set_header X-Forwarded-Proto $scheme;
23 proxy_buffering off; # lowers response latency
24 proxy_pass http://127.0.0.1:8001$request_uri;
28 ssl_certificate /path/to/certificate.pem;
29 ssl_certificate_key /path/to/certificate_key.pem;