2013-07-14 05:58:46 +02:00
|
|
|
upstream staging {
|
|
|
|
server staging.zulip.net:443;
|
2013-12-05 22:27:36 +01:00
|
|
|
|
|
|
|
keepalive 10000;
|
2013-07-14 05:58:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
upstream prod {
|
|
|
|
server prod0.zulip.net:443;
|
2013-12-05 22:27:36 +01:00
|
|
|
|
|
|
|
keepalive 10000;
|
2013-07-14 05:58:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
server {
|
|
|
|
listen 80;
|
|
|
|
return 301 https://$host$request_uri;
|
|
|
|
}
|
|
|
|
|
|
|
|
server {
|
|
|
|
listen staging.zulip.com:443;
|
|
|
|
|
|
|
|
ssl on;
|
2014-04-24 23:40:05 +02:00
|
|
|
ssl_certificate /etc/ssl/certs/wildcard-all.combined-chain.crt;
|
|
|
|
ssl_certificate_key /etc/ssl/private/wildcard-all.key;
|
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
|
|
|
|
|
|
|
location /sockjs {
|
|
|
|
proxy_pass https://staging;
|
|
|
|
include /etc/nginx/zulip-include/location-sockjs;
|
|
|
|
}
|
2013-12-03 23:19:04 +01:00
|
|
|
|
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;
|
|
|
|
}
|
2013-07-14 05:58:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
server {
|
|
|
|
# This stanza also covers bare zulip.com
|
2014-01-16 21:52:58 +01:00
|
|
|
listen www.zulip.com:443 default_server;
|
2013-07-14 05:58:46 +02:00
|
|
|
|
|
|
|
ssl on;
|
2014-04-24 23:40:05 +02:00
|
|
|
ssl_certificate /etc/ssl/certs/wildcard-all.combined-chain.crt;
|
|
|
|
ssl_certificate_key /etc/ssl/private/wildcard-all.key;
|
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
|
|
|
|
|
|
|
location /sockjs {
|
|
|
|
proxy_pass https://prod;
|
|
|
|
include /etc/nginx/zulip-include/location-sockjs;
|
|
|
|
}
|
2013-12-03 23:19:04 +01: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;
|
|
|
|
}
|
2013-07-14 05:58:46 +02:00
|
|
|
}
|
|
|
|
|
2013-09-04 21:57:31 +02:00
|
|
|
server {
|
2015-02-06 02:44:31 +01:00
|
|
|
listen www.zulip.com:443;
|
|
|
|
server_name external-content.zulipcdn.net;
|
|
|
|
|
2013-09-04 21:57:31 +02:00
|
|
|
|
|
|
|
ssl on;
|
2014-04-24 23:40:05 +02:00
|
|
|
ssl_certificate /etc/ssl/certs/wildcard-all.combined-chain.crt;
|
|
|
|
ssl_certificate_key /etc/ssl/private/wildcard-all.key;
|
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
|
|
|
}
|
|
|
|
}
|