mirror of https://github.com/zulip/zulip.git
nginx: Update configuration for using certbot certs everywhere.
This commit is contained in:
parent
0de30589b0
commit
b53a712856
|
@ -12,9 +12,13 @@ upstream prod {
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
|
location / {
|
||||||
return 301 https://$host$request_uri;
|
return 301 https://$host$request_uri;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
include /etc/nginx/zulip-include/certbot;
|
||||||
|
}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
# The listen needs to be `www.zulipstaging.com` since bare zulipstaging.com
|
# The listen needs to be `www.zulipstaging.com` since bare zulipstaging.com
|
||||||
# is not a CNAME and thus has the public IP inside EC2
|
# is not a CNAME and thus has the public IP inside EC2
|
||||||
|
@ -22,8 +26,8 @@ server {
|
||||||
server_name zulipstaging.com *.zulipstaging.com;
|
server_name zulipstaging.com *.zulipstaging.com;
|
||||||
|
|
||||||
ssl on;
|
ssl on;
|
||||||
ssl_certificate /etc/ssl/certs/wildcard-zulipstaging.com.combined-chain.crt;
|
ssl_certificate /etc/letsencrypt/live/zulipstaging.com/fullchain.pem;
|
||||||
ssl_certificate_key /etc/ssl/private/wildcard-zulipstaging.com.key;
|
ssl_certificate_key /etc/letsencrypt/live/zulipstaging.com/privkey.pem;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_pass https://staging/;
|
proxy_pass https://staging/;
|
||||||
|
@ -51,8 +55,60 @@ server {
|
||||||
server_name zulipchat.com *.zulipchat.com;
|
server_name zulipchat.com *.zulipchat.com;
|
||||||
|
|
||||||
ssl on;
|
ssl on;
|
||||||
ssl_certificate /etc/ssl/certs/wildcard-zulipchat.com.combined-chain.crt;
|
ssl_certificate /etc/letsencrypt/live/zulipchat.com/fullchain.pem;
|
||||||
ssl_certificate_key /etc/ssl/private/wildcard-zulipchat.com.key;
|
ssl_certificate_key /etc/letsencrypt/live/zulipchat.com/privkey.pem;
|
||||||
|
|
||||||
|
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/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
|
||||||
|
listen www.zulip.com:443;
|
||||||
|
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 /sockjs {
|
||||||
|
proxy_pass https://prod;
|
||||||
|
include /etc/nginx/zulip-include/location-sockjs;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ /json/events|/api/v1/events {
|
||||||
|
proxy_pass https://prod;
|
||||||
|
include /etc/nginx/zulip-include/proxy_longpolling;
|
||||||
|
}
|
||||||
|
|
||||||
|
include /etc/nginx/zulip-include/certbot;
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen chat.hl7.org:443;
|
||||||
|
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;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_pass https://prod;
|
proxy_pass https://prod;
|
||||||
|
|
Loading…
Reference in New Issue