From 6c4006625d60e20ea27916bc11b0b4e4cdc61191 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Sat, 16 Sep 2017 02:09:53 -0700 Subject: [PATCH] nginx: Update zulip.org nginx configuration. * Added zulipbot to configuration. * Added redirect to zulipchat.com for homepage. --- puppet/zulip/files/nginx/sites-available/zulip-org | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/puppet/zulip/files/nginx/sites-available/zulip-org b/puppet/zulip/files/nginx/sites-available/zulip-org index 965c34e0df..25812a9391 100644 --- a/puppet/zulip/files/nginx/sites-available/zulip-org +++ b/puppet/zulip/files/nginx/sites-available/zulip-org @@ -3,6 +3,11 @@ server { return 301 https://$host$request_uri; } +upstream zulipbot { + server localhost:8080; + keepalive 10000; +} + server { listen 443; server_name zulip.org; @@ -16,8 +21,13 @@ server { alias /home/zulip/dist/; } + location /zulipbot/ { + rewrite /zulipbot(.*)/ /$1 break; + proxy_pass http://zulipbot; + proxy_set_header X-Real-IP $remote_addr; + } + location / { - autoindex on; - alias /home/zulip/zulip.github.io/; + rewrite ^/ https://zulipchat.com permanent; } }