user/dev discussion of public-inbox itself
 help / color / Atom feed
* [PATCH] examples: add sample nginx configuration
@ 2019-06-04  9:22 Ali Alnubani
  2019-06-04 10:24 ` Eric Wong
  0 siblings, 1 reply; 2+ messages in thread
From: Ali Alnubani @ 2019-06-04  9:22 UTC (permalink / raw)
  To: meta; +Cc: e

The sample configuration can be used to proxy-pass requests
to public-inbox-httpd or to a standalone PSGI/Plack server.
---
 examples/nginx_proxy | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 examples/nginx_proxy

diff --git a/examples/nginx_proxy b/examples/nginx_proxy
new file mode 100644
index 0000000..d8d1e6d
--- /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;
+}
+
-- 
2.21.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] examples: add sample nginx configuration
  2019-06-04  9:22 [PATCH] examples: add sample nginx configuration Ali Alnubani
@ 2019-06-04 10:24 ` Eric Wong
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Wong @ 2019-06-04 10:24 UTC (permalink / raw)
  To: Ali Alnubani; +Cc: meta

Applied and pushed, thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-04  9:22 [PATCH] examples: add sample nginx configuration Ali Alnubani
2019-06-04 10:24 ` Eric Wong

user/dev discussion of public-inbox itself

Archives are clonable:
	git clone --mirror https://public-inbox.org/meta
	git clone --mirror http://czquwvybam4bgbro.onion/meta
	git clone --mirror http://hjrcffqmbrq6wope.onion/meta
	git clone --mirror http://ou63pmih66umazou.onion/meta

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.mail.public-inbox.meta
	nntp://ou63pmih66umazou.onion/inbox.comp.mail.public-inbox.meta
	nntp://czquwvybam4bgbro.onion/inbox.comp.mail.public-inbox.meta
	nntp://hjrcffqmbrq6wope.onion/inbox.comp.mail.public-inbox.meta
	nntp://news.gmane.org/gmane.mail.public-inbox.general

 note: .onion URLs require Tor: https://www.torproject.org/

AGPL code for this site: git clone https://public-inbox.org/ public-inbox