From: Eric Wong Date: Tue, 4 Jun 2019 10:38:20 +0000 (+0000) Subject: Merge branch 'charclass' X-Git-Tag: v1.2.0~196 X-Git-Url: http://www.git.stargrave.org/?p=public-inbox.git;a=commitdiff_plain;h=e56b908c0e97c2f479b350dfb0868bc463413b89;hp=91af69a41f2963f1f952cb0932ed23cd86cd1093 Merge branch 'charclass' * charclass: (24 commits) www: require ASCII word characters for CSS filenames www: require ASCII range for mbox downloads githttpbackend: require ASCII in path require ASCII digits for local FS items www: require ASCII digit for git epoch solver|viewdiff: restrict digit matches to ASCII inbox: require ASCII digits for feedmax var filter/rubylang: require ASCII digit for mailcount msgtime: require ASCII digits for parsing dates searchview: do not allow non-ASCII offsets and limits githttpbackend: require Range:, Status: to be ASCII digits view: require YYYYmmDD(HHMMSS) timestamps to be ASCII newswww: only accept ASCII digits as article numbers config: do not accept non-ASCII digits in cgitrc params www: require ASCII filenames in git blob downloads www: only emit ASCII chars in attachment filenames wwwattach: only pass the charset through if ASCII wwwlisting: require ASCII digit for port number http: require SERVER_PORT to be ASCII digit feed: only accept ASCII digits for ref~$N ... --- diff --git a/MANIFEST b/MANIFEST index c1a5d677..8a3f2a4a 100644 --- a/MANIFEST +++ b/MANIFEST @@ -51,6 +51,7 @@ examples/cgit.psgi examples/highlight.psgi examples/logrotate.conf examples/newswww.psgi +examples/nginx_proxy examples/public-inbox-config examples/public-inbox-httpd.socket examples/public-inbox-httpd@.service diff --git a/examples/nginx_proxy b/examples/nginx_proxy new file mode 100644 index 00000000..38e60643 --- /dev/null +++ b/examples/nginx_proxy @@ -0,0 +1,24 @@ +# Example NGINX configuration to proxy-pass requests +# to public-inbox-httpd or to a standalone 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. +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_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; +} +