mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 20:44:04 +00:00
This is safe because we have the wildcard-all cert. DEPLOY INSTRUCTIONS: Change the CNAME in R53 for external-content.zulipcdn.net to the same as www.zulip.com (imported from commit 075984943ce3a3b17518b913ea650992e45f705e)
163 lines
3.6 KiB
Plaintext
163 lines
3.6 KiB
Plaintext
upstream staging {
|
|
server staging.zulip.net:443;
|
|
|
|
keepalive 10000;
|
|
}
|
|
|
|
upstream alpha {
|
|
server alpha0.zulip.net:443;
|
|
|
|
keepalive 10000;
|
|
}
|
|
|
|
upstream prod {
|
|
server prod0.zulip.net:443;
|
|
|
|
keepalive 10000;
|
|
}
|
|
|
|
upstream dbx {
|
|
server dbx.zulip.net:443;
|
|
|
|
keepalive 10000;
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
|
|
server {
|
|
listen www.humbughq.com:443;
|
|
server_name www.humbughq.com api.humbughq.com humbughq.com;
|
|
|
|
ssl on;
|
|
ssl_certificate /etc/ssl/certs/wildcard-all.combined-chain.crt;
|
|
ssl_certificate_key /etc/ssl/private/wildcard-all.key;
|
|
|
|
location / {
|
|
proxy_pass https://prod;
|
|
include /etc/nginx/zulip-include/proxy;
|
|
}
|
|
|
|
location /sockjs {
|
|
proxy_pass https://prod;
|
|
include /etc/nginx/zulip-include/location-sockjs;
|
|
}
|
|
|
|
location ~ /json/get_events|/json/events|/api/v1/events {
|
|
proxy_pass https://prod;
|
|
include /etc/nginx/zulip-include/proxy_longpolling;
|
|
}
|
|
}
|
|
|
|
server {
|
|
listen staging.zulip.com:443;
|
|
|
|
ssl on;
|
|
ssl_certificate /etc/ssl/certs/wildcard-all.combined-chain.crt;
|
|
ssl_certificate_key /etc/ssl/private/wildcard-all.key;
|
|
|
|
location / {
|
|
proxy_pass https://staging/;
|
|
include /etc/nginx/zulip-include/proxy;
|
|
}
|
|
|
|
location /sockjs {
|
|
proxy_pass https://staging;
|
|
include /etc/nginx/zulip-include/location-sockjs;
|
|
}
|
|
|
|
location ~ /json/get_events|/json/events|/api/v1/events {
|
|
proxy_pass https://staging;
|
|
include /etc/nginx/zulip-include/proxy_longpolling;
|
|
}
|
|
}
|
|
|
|
server {
|
|
# This stanza also covers bare zulip.com
|
|
listen www.zulip.com:443 default_server;
|
|
|
|
ssl on;
|
|
ssl_certificate /etc/ssl/certs/wildcard-all.combined-chain.crt;
|
|
ssl_certificate_key /etc/ssl/private/wildcard-all.key;
|
|
|
|
location / {
|
|
proxy_pass https://prod;
|
|
include /etc/nginx/zulip-include/proxy;
|
|
}
|
|
|
|
location /sockjs {
|
|
proxy_pass https://prod;
|
|
include /etc/nginx/zulip-include/location-sockjs;
|
|
}
|
|
|
|
location ~ /json/get_events|/json/events|/api/v1/events {
|
|
proxy_pass https://prod;
|
|
include /etc/nginx/zulip-include/proxy_longpolling;
|
|
}
|
|
}
|
|
|
|
server {
|
|
listen api.zulip.com:443;
|
|
|
|
ssl on;
|
|
ssl_certificate /etc/ssl/certs/wildcard-all.combined-chain.crt;
|
|
ssl_certificate_key /etc/ssl/private/wildcard-all.key;
|
|
|
|
location / {
|
|
proxy_pass https://prod;
|
|
include /etc/nginx/zulip-include/proxy;
|
|
}
|
|
|
|
location /sockjs {
|
|
proxy_pass https://prod;
|
|
include /etc/nginx/zulip-include/location-sockjs;
|
|
}
|
|
|
|
# On api.zulip.com, there's an automatic leading /api
|
|
location ~ /v1/events {
|
|
proxy_pass https://prod;
|
|
include /etc/nginx/zulip-include/proxy_longpolling;
|
|
}
|
|
}
|
|
|
|
|
|
server {
|
|
listen zephyr.zulip.com:443;
|
|
|
|
ssl on;
|
|
ssl_certificate /etc/ssl/certs/wildcard-all.combined-chain.crt;
|
|
ssl_certificate_key /etc/ssl/private/wildcard-all.key;
|
|
|
|
location / {
|
|
proxy_pass https://prod;
|
|
include /etc/nginx/zulip-include/proxy;
|
|
}
|
|
|
|
location /sockjs {
|
|
proxy_pass https://prod;
|
|
include /etc/nginx/zulip-include/location-sockjs;
|
|
}
|
|
|
|
location ~ /json/get_events|/json/events|/api/v1/events {
|
|
proxy_pass https://prod;
|
|
include /etc/nginx/zulip-include/proxy_longpolling;
|
|
}
|
|
}
|
|
|
|
server {
|
|
listen www.zulip.com:443;
|
|
server_name external-content.zulipcdn.net;
|
|
|
|
|
|
ssl on;
|
|
ssl_certificate /etc/ssl/certs/wildcard-all.combined-chain.crt;
|
|
ssl_certificate_key /etc/ssl/private/wildcard-all.key;
|
|
|
|
location / {
|
|
proxy_pass http://127.0.0.1:9292;
|
|
include /etc/nginx/zulip-include/proxy;
|
|
}
|
|
}
|