2013-07-14 05:58:46 +02:00
|
|
|
upstream staging {
|
|
|
|
server staging.zulip.net:443;
|
|
|
|
}
|
|
|
|
|
|
|
|
upstream prod {
|
|
|
|
server prod0.zulip.net:443;
|
|
|
|
}
|
|
|
|
|
|
|
|
server {
|
|
|
|
listen 80;
|
|
|
|
return 301 https://$host$request_uri;
|
|
|
|
}
|
|
|
|
|
|
|
|
server {
|
|
|
|
listen staging.humbughq.com:443;
|
|
|
|
|
|
|
|
ssl on;
|
|
|
|
ssl_certificate /etc/ssl/certs/wildcard-humbughq.com.combined-chain.crt;
|
|
|
|
ssl_certificate_key /etc/ssl/private/app.humbughq.com.key;
|
|
|
|
|
|
|
|
location / {
|
|
|
|
proxy_pass https://staging/;
|
2013-09-25 20:32:26 +02:00
|
|
|
include /etc/nginx/zulip-include/loadbalancer;
|
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
|
|
|
|
|
|
|
location ~ /json/get_events|/json/events|/api/v1/events {
|
|
|
|
proxy_pass https://staging/;
|
|
|
|
include /etc/nginx/zulip-include/proxy_longpolling;
|
|
|
|
}
|
2013-07-14 05:58:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
server {
|
|
|
|
# This stanza covers api, www, zephyr, and bare humbughq.com
|
|
|
|
listen www.humbughq.com:443;
|
|
|
|
|
|
|
|
ssl on;
|
|
|
|
ssl_certificate /etc/ssl/certs/wildcard-humbughq.com.combined-chain.crt;
|
|
|
|
ssl_certificate_key /etc/ssl/private/app.humbughq.com.key;
|
|
|
|
|
|
|
|
location / {
|
|
|
|
proxy_pass https://prod/;
|
2013-09-25 20:32:26 +02:00
|
|
|
include /etc/nginx/zulip-include/loadbalancer;
|
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
|
|
|
|
|
|
|
location ~ /json/get_events|/json/events|/api/v1/events {
|
|
|
|
proxy_pass https://prod/;
|
|
|
|
include /etc/nginx/zulip-include/proxy_longpolling;
|
|
|
|
}
|
2013-07-14 05:58:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
server {
|
|
|
|
listen staging.zulip.com:443;
|
|
|
|
|
|
|
|
ssl on;
|
|
|
|
ssl_certificate /etc/ssl/certs/staging.zulip.com.combined-chain.crt;
|
|
|
|
ssl_certificate_key /etc/ssl/private/staging-zulip.key;
|
|
|
|
|
|
|
|
location / {
|
|
|
|
proxy_pass https://staging/;
|
2013-09-25 20:32:26 +02:00
|
|
|
include /etc/nginx/zulip-include/loadbalancer;
|
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
|
|
|
|
|
|
|
location ~ /json/get_events|/json/events|/api/v1/events {
|
|
|
|
proxy_pass https://prod/;
|
|
|
|
include /etc/nginx/zulip-include/proxy_longpolling;
|
|
|
|
}
|
2013-07-14 05:58:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
server {
|
|
|
|
# This stanza also covers bare zulip.com
|
|
|
|
listen www.zulip.com:443;
|
|
|
|
|
|
|
|
ssl on;
|
|
|
|
ssl_certificate /etc/ssl/certs/www.zulip.com.combined-chain.crt;
|
|
|
|
ssl_certificate_key /etc/ssl/private/production-zulip.key;
|
|
|
|
|
|
|
|
location / {
|
|
|
|
proxy_pass https://prod/;
|
2013-09-25 20:32:26 +02:00
|
|
|
include /etc/nginx/zulip-include/loadbalancer;
|
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
|
|
|
|
|
|
|
location ~ /json/get_events|/json/events|/api/v1/events {
|
|
|
|
proxy_pass https://prod/;
|
|
|
|
include /etc/nginx/zulip-include/proxy_longpolling;
|
|
|
|
}
|
2013-07-14 05:58:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
server {
|
|
|
|
listen api.zulip.com:443;
|
|
|
|
|
|
|
|
ssl on;
|
|
|
|
ssl_certificate /etc/ssl/certs/api.zulip.com.combined-chain.crt;
|
|
|
|
ssl_certificate_key /etc/ssl/private/production-zulip.key;
|
|
|
|
|
|
|
|
location / {
|
|
|
|
proxy_pass https://prod/;
|
2013-09-25 20:32:26 +02:00
|
|
|
include /etc/nginx/zulip-include/loadbalancer;
|
2013-07-14 05:58:46 +02:00
|
|
|
}
|
2013-12-03 22:48:06 +01:00
|
|
|
|
|
|
|
location /sockjs {
|
|
|
|
proxy_pass https://prod;
|
|
|
|
include /etc/nginx/zulip-include/location-sockjs;
|
|
|
|
}
|
2013-12-03 23:19:04 +01:00
|
|
|
|
|
|
|
location ~ /json/get_events|/json/events|/api/v1/events {
|
|
|
|
proxy_pass https://prod/;
|
|
|
|
include /etc/nginx/zulip-include/proxy_longpolling;
|
|
|
|
}
|
2013-07-14 05:58:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
server {
|
|
|
|
listen zephyr.zulip.com:443;
|
|
|
|
|
|
|
|
ssl on;
|
|
|
|
ssl_certificate /etc/ssl/certs/zephyr.zulip.com.combined-chain.crt;
|
|
|
|
ssl_certificate_key /etc/ssl/private/production-zulip.key;
|
|
|
|
|
|
|
|
location / {
|
|
|
|
proxy_pass https://prod/;
|
2013-09-25 20:32:26 +02:00
|
|
|
include /etc/nginx/zulip-include/loadbalancer;
|
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
|
|
|
|
|
|
|
location ~ /json/get_events|/json/events|/api/v1/events {
|
|
|
|
proxy_pass https://prod/;
|
|
|
|
include /etc/nginx/zulip-include/proxy_longpolling;
|
|
|
|
}
|
2013-07-14 05:58:46 +02:00
|
|
|
}
|
2013-09-04 21:57:31 +02:00
|
|
|
|
|
|
|
server {
|
|
|
|
listen external-content.zulipcdn.net:443;
|
|
|
|
|
|
|
|
ssl on;
|
|
|
|
ssl_certificate /etc/ssl/certs/external-content.zulipcdn.net.combined-chain.crt;
|
|
|
|
ssl_certificate_key /etc/ssl/private/production-zulipcdn.key;
|
|
|
|
|
|
|
|
location / {
|
|
|
|
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
|
|
|
}
|
|
|
|
}
|