]> Sergey Matveev's repositories - public-inbox.git/blob - examples/nginx_proxy
netd: load modules for well-known ports
[public-inbox.git] / examples / nginx_proxy
1 # Example NGINX configuration to proxy-pass requests
2 # to public-inbox-httpd or to a standalone 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.
6 server {
7         server_name _;
8         listen 80;
9
10         access_log /var/log/nginx/public-inbox-httpd_access.log;
11         error_log /var/log/nginx/public-inbox-httpd_error.log;
12
13         location ~* ^/(.*)$ {
14                 proxy_set_header    HOST $host;
15                 proxy_set_header    X-Real-IP $remote_addr;
16                 proxy_set_header    X-Forwarded-Proto $scheme;
17                 proxy_pass          http://127.0.0.1:8001$request_uri;
18         }
19
20         listen 443 ssl;
21         ssl_certificate /path/to/certificate.pem;
22         ssl_certificate_key /path/to/certificate_key.pem;
23 }
24