2013-07-14 05:58:46 +02:00
|
|
|
upstream staging {
|
2016-07-21 07:05:17 +02:00
|
|
|
server staging0.zulipchat.net:443;
|
2013-12-05 22:27:36 +01:00
|
|
|
|
|
|
|
keepalive 10000;
|
2013-07-14 05:58:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
upstream prod {
|
2016-07-21 07:05:17 +02:00
|
|
|
server prod0.zulipchat.net:443;
|
2013-12-05 22:27:36 +01:00
|
|
|
|
|
|
|
keepalive 10000;
|
2013-07-14 05:58:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
server {
|
|
|
|
listen 80;
|
2018-08-22 20:58:53 +02:00
|
|
|
location / {
|
|
|
|
return 301 https://$host$request_uri;
|
|
|
|
}
|
|
|
|
|
|
|
|
include /etc/nginx/zulip-include/certbot;
|
2013-07-14 05:58:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
server {
|
2016-07-21 07:05:17 +02:00
|
|
|
# The listen needs to be `www.zulipstaging.com` since bare zulipstaging.com
|
|
|
|
# is not a CNAME and thus has the public IP inside EC2
|
2018-12-07 22:37:16 +01:00
|
|
|
listen www.zulipstaging.com:443 http2;
|
2016-07-21 07:05:17 +02:00
|
|
|
server_name zulipstaging.com *.zulipstaging.com;
|
2013-07-14 05:58:46 +02:00
|
|
|
|
|
|
|
ssl on;
|
2018-12-07 22:41:01 +01:00
|
|
|
ssl_certificate /etc/letsencrypt/live/zulipchat.com/fullchain.pem;
|
|
|
|
ssl_certificate_key /etc/letsencrypt/live/zulipchat.com/privkey.pem;
|
2013-07-14 05:58:46 +02:00
|
|
|
|
|
|
|
location / {
|
|
|
|
proxy_pass https://staging/;
|
2013-12-03 23:28:22 +01:00
|
|
|
include /etc/nginx/zulip-include/proxy;
|
2013-07-14 05:58:46 +02:00
|
|
|
}
|
2013-09-25 17:02:46 +02:00
|
|
|
|
2018-07-13 12:58:16 +02:00
|
|
|
# We don't need /api/v1/events/internal, because that doesn't go through the loadbalancer.
|
2016-10-19 02:51:19 +02:00
|
|
|
location ~ /json/events|/api/v1/events {
|
2013-12-07 13:57:59 +01:00
|
|
|
proxy_pass https://staging;
|
2013-12-03 23:19:04 +01:00
|
|
|
include /etc/nginx/zulip-include/proxy_longpolling;
|
|
|
|
}
|
2017-11-03 23:01:11 +01:00
|
|
|
|
|
|
|
include /etc/nginx/zulip-include/certbot;
|
2013-07-14 05:58:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
server {
|
2016-07-21 07:05:17 +02:00
|
|
|
# The listen needs to be `www.zulipchat.com` since bare zulipchat.com
|
|
|
|
# is not a CNAME and thus has the public IP inside EC2
|
2018-12-07 22:37:16 +01:00
|
|
|
listen www.zulipchat.com:443 default_server http2;
|
2016-07-21 07:05:17 +02:00
|
|
|
server_name zulipchat.com *.zulipchat.com;
|
2013-07-14 05:58:46 +02:00
|
|
|
|
|
|
|
ssl on;
|
2018-08-22 20:58:53 +02:00
|
|
|
ssl_certificate /etc/letsencrypt/live/zulipchat.com/fullchain.pem;
|
|
|
|
ssl_certificate_key /etc/letsencrypt/live/zulipchat.com/privkey.pem;
|
|
|
|
|
|
|
|
location / {
|
|
|
|
proxy_pass https://prod;
|
|
|
|
include /etc/nginx/zulip-include/proxy;
|
|
|
|
}
|
|
|
|
|
|
|
|
location ~ /json/events|/api/v1/events {
|
|
|
|
proxy_pass https://prod;
|
|
|
|
include /etc/nginx/zulip-include/proxy_longpolling;
|
|
|
|
}
|
|
|
|
|
|
|
|
include /etc/nginx/zulip-include/certbot;
|
|
|
|
}
|
|
|
|
|
|
|
|
server {
|
|
|
|
# The listen needs to be `www.zulip.com` since bare zulip.com
|
|
|
|
# is not a CNAME and thus has the public IP inside EC2
|
2018-12-07 22:37:16 +01:00
|
|
|
listen www.zulip.com:443 http2;
|
2018-08-22 20:58:53 +02:00
|
|
|
server_name zulip.com *.zulip.com;
|
|
|
|
|
|
|
|
ssl on;
|
|
|
|
ssl_certificate /etc/letsencrypt/live/zulipchat.com/fullchain.pem;
|
|
|
|
ssl_certificate_key /etc/letsencrypt/live/zulipchat.com/privkey.pem;
|
|
|
|
|
|
|
|
location / {
|
|
|
|
proxy_pass https://prod;
|
|
|
|
include /etc/nginx/zulip-include/proxy;
|
|
|
|
}
|
|
|
|
|
|
|
|
location ~ /json/events|/api/v1/events {
|
|
|
|
proxy_pass https://prod;
|
|
|
|
include /etc/nginx/zulip-include/proxy_longpolling;
|
|
|
|
}
|
|
|
|
|
|
|
|
include /etc/nginx/zulip-include/certbot;
|
|
|
|
}
|
|
|
|
|
|
|
|
server {
|
2018-12-07 22:37:16 +01:00
|
|
|
listen chat.hl7.org:443 http2;
|
2018-08-22 20:58:53 +02:00
|
|
|
server_name chat.hl7.org;
|
|
|
|
ssl_certificate /etc/letsencrypt/live/chat.hl7.org/fullchain.pem;
|
|
|
|
ssl_certificate_key /etc/letsencrypt/live/chat.hl7.org/privkey.pem;
|
2013-07-14 05:58:46 +02:00
|
|
|
|
|
|
|
location / {
|
2013-12-04 17:26:47 +01:00
|
|
|
proxy_pass https://prod;
|
2013-12-03 23:28:22 +01:00
|
|
|
include /etc/nginx/zulip-include/proxy;
|
2013-07-14 05:58:46 +02:00
|
|
|
}
|
2013-09-25 17:02:46 +02:00
|
|
|
|
2016-10-19 02:51:19 +02:00
|
|
|
location ~ /json/events|/api/v1/events {
|
2013-12-04 17:26:47 +01:00
|
|
|
proxy_pass https://prod;
|
2013-12-03 23:19:04 +01:00
|
|
|
include /etc/nginx/zulip-include/proxy_longpolling;
|
|
|
|
}
|
2017-11-03 23:01:11 +01:00
|
|
|
|
|
|
|
include /etc/nginx/zulip-include/certbot;
|
2013-07-14 05:58:46 +02:00
|
|
|
}
|
|
|
|
|
2013-09-04 21:57:31 +02:00
|
|
|
server {
|
2018-12-07 22:37:16 +01:00
|
|
|
listen uploads.zulipusercontent.net:443 http2;
|
2016-07-21 07:05:17 +02:00
|
|
|
server_name uploads.zulipusercontent.net;
|
2013-09-04 21:57:31 +02:00
|
|
|
|
|
|
|
ssl on;
|
2016-07-21 07:05:17 +02:00
|
|
|
ssl_certificate /etc/letsencrypt/live/uploads.zulipusercontent.net/fullchain.pem;
|
|
|
|
ssl_certificate_key /etc/letsencrypt/live/uploads.zulipusercontent.net/privkey.pem;
|
2013-09-04 21:57:31 +02:00
|
|
|
|
|
|
|
location / {
|
2013-12-04 17:26:47 +01:00
|
|
|
proxy_pass http://127.0.0.1:9292;
|
2013-12-03 23:10:05 +01:00
|
|
|
include /etc/nginx/zulip-include/proxy;
|
2013-09-04 21:57:31 +02:00
|
|
|
}
|
2017-11-03 23:01:11 +01:00
|
|
|
|
|
|
|
include /etc/nginx/zulip-include/certbot;
|
2013-09-04 21:57:31 +02:00
|
|
|
}
|