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
|
|
|
}
|
|
|
|
|
2020-10-10 00:31:50 +02:00
|
|
|
server {
|
|
|
|
listen www.zulipstaging.com:443 http2;
|
|
|
|
server_name www.zulipstaging.com;
|
|
|
|
|
|
|
|
ssl on;
|
|
|
|
ssl_certificate /etc/letsencrypt/live/zulipchat.com/fullchain.pem;
|
|
|
|
ssl_certificate_key /etc/letsencrypt/live/zulipchat.com/privkey.pem;
|
|
|
|
|
|
|
|
location / {
|
|
|
|
return 301 https://zulipstaging.com$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.
|
2020-04-25 01:00:33 +02:00
|
|
|
location /json/events {
|
|
|
|
proxy_pass https://staging;
|
|
|
|
include /etc/nginx/zulip-include/proxy_longpolling;
|
|
|
|
}
|
|
|
|
|
|
|
|
location /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
|
2020-10-10 00:31:50 +02:00
|
|
|
listen www.zulipchat.com:443 http2;
|
|
|
|
server_name www.zulipchat.com zulipchat.com www.zulip.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 / {
|
2020-10-10 00:31:50 +02:00
|
|
|
return 301 https://zulip.com$request_uri;
|
2018-08-22 20:58:53 +02:00
|
|
|
}
|
|
|
|
|
2020-10-10 00:31:50 +02:00
|
|
|
location /static {
|
|
|
|
# The app loads static files from https://zulipchat.com/static,
|
|
|
|
# so skip the redirect for those.
|
2020-04-25 01:00:33 +02:00
|
|
|
proxy_pass https://prod;
|
2020-10-10 00:31:50 +02:00
|
|
|
include /etc/nginx/zulip-include/proxy;
|
2018-08-22 20:58:53 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
include /etc/nginx/zulip-include/certbot;
|
|
|
|
}
|
|
|
|
|
|
|
|
server {
|
2020-10-10 00:31:50 +02:00
|
|
|
# The listen needs to be `www.zulipchat.com` since bare zulipchat.com
|
2018-08-22 20:58:53 +02:00
|
|
|
# is not a CNAME and thus has the public IP inside EC2
|
2020-10-10 00:31:50 +02:00
|
|
|
listen www.zulipchat.com:443 default_server http2;
|
|
|
|
server_name *.zulipchat.com zulip.com *.zulip.com;
|
2018-08-22 20:58:53 +02:00
|
|
|
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2020-04-25 01:00:33 +02:00
|
|
|
location /json/events {
|
|
|
|
proxy_pass https://prod;
|
|
|
|
include /etc/nginx/zulip-include/proxy_longpolling;
|
|
|
|
}
|
|
|
|
|
|
|
|
location /api/v1/events {
|
2018-08-22 20:58:53 +02:00
|
|
|
proxy_pass https://prod;
|
|
|
|
include /etc/nginx/zulip-include/proxy_longpolling;
|
|
|
|
}
|
|
|
|
|
|
|
|
include /etc/nginx/zulip-include/certbot;
|
|
|
|
}
|
|
|
|
|
|
|
|
server {
|
2020-05-20 02:49:09 +02:00
|
|
|
listen chat.fhir.org:443 http2;
|
|
|
|
server_name chat.fhir.org;
|
|
|
|
ssl_certificate /etc/letsencrypt/live/chat.fhir.org/fullchain.pem;
|
|
|
|
ssl_certificate_key /etc/letsencrypt/live/chat.fhir.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
|
|
|
|
2020-04-25 01:00:33 +02:00
|
|
|
location /json/events {
|
|
|
|
proxy_pass https://prod;
|
|
|
|
include /etc/nginx/zulip-include/proxy_longpolling;
|
|
|
|
}
|
|
|
|
|
|
|
|
location /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
|
|
|
}
|