user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
blob 754a4931d97700f58ca4cc47d390de1d880905a1 1041 bytes (raw)
name: examples/nginx_proxy 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
 
# Example NGINX configuration to proxy-pass requests
# to varnish, public-inbox-(httpd|netd) or any PSGI/Plack server.
# The daemon is assumed to be running locally on port 8001.
# Adjust ssl certificate paths if you use any, or remove
# the ssl configuration directives if you don't.
#
# Note: public-inbox-httpd and -netd both support HTTPS, but they
# don't support caching which Varnish provides.  The recommended
# setup is currently:
#
#   (nginx|any-HTTPS-proxy) <-> varnish <-> public-inbox-(httpd|netd)
server {
	server_name _;
	listen 80;

	access_log /var/log/nginx/public-inbox-httpd_access.log;
	error_log /var/log/nginx/public-inbox-httpd_error.log;

	location ~* ^/(.*)$ {
		proxy_set_header    HOST $host;
		proxy_set_header    X-Real-IP $remote_addr;
		proxy_set_header    X-Forwarded-Proto $scheme;
		proxy_buffering off; # lowers response latency
		proxy_pass          http://127.0.0.1:8001$request_uri;
	}

	listen 443 ssl;
	ssl_certificate /path/to/certificate.pem;
	ssl_certificate_key /path/to/certificate_key.pem;
}


debug log:

solving 754a4931 ...
found 754a4931 in https://80x24.org/public-inbox.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).