mirror of https://github.com/zulip/zulip.git
nginx: Move common proxy configuration into an include file.
(imported from commit 2ee5afc74fe146f8ee98f18f846342351c61c7f0)
This commit is contained in:
parent
3760609f3f
commit
9e24558092
|
@ -4,6 +4,5 @@
|
||||||
# identified the user.
|
# identified the user.
|
||||||
location /accounts/login/sso/ {
|
location /accounts/login/sso/ {
|
||||||
proxy_pass https://localhost:8888;
|
proxy_pass https://localhost:8888;
|
||||||
proxy_set_header Host $host;
|
include /etc/nginx/zulip-include/proxy;
|
||||||
proxy_next_upstream off;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,14 +16,12 @@ location /static/ {
|
||||||
# Send longpoll requests to Tornado
|
# Send longpoll requests to Tornado
|
||||||
location ~ /json/get_events|/json/events|/api/v1/events {
|
location ~ /json/get_events|/json/events|/api/v1/events {
|
||||||
proxy_pass http://localhost:9993;
|
proxy_pass http://localhost:9993;
|
||||||
proxy_redirect off;
|
include /etc/nginx/zulip-include/proxy;
|
||||||
|
|
||||||
# Needed for longpolling
|
# Needed for longpolling
|
||||||
proxy_buffering off;
|
proxy_buffering off;
|
||||||
proxy_read_timeout 1200;
|
proxy_read_timeout 1200;
|
||||||
|
|
||||||
proxy_next_upstream off;
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
}
|
}
|
||||||
|
@ -31,7 +29,6 @@ location ~ /json/get_events|/json/events|/api/v1/events {
|
||||||
# Send sockjs requests to Tornado
|
# Send sockjs requests to Tornado
|
||||||
location /sockjs {
|
location /sockjs {
|
||||||
proxy_pass http://localhost:9993;
|
proxy_pass http://localhost:9993;
|
||||||
proxy_next_upstream off;
|
|
||||||
include /etc/nginx/zulip-include/location-sockjs;
|
include /etc/nginx/zulip-include/location-sockjs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
proxy_http_version 1.1;
|
include /etc/nginx/zulip-include/proxy;
|
||||||
|
|
||||||
# Needed for xhr_streaming transport
|
# Needed for xhr_streaming transport
|
||||||
proxy_buffering off;
|
proxy_buffering off;
|
||||||
proxy_read_timeout 1200;
|
proxy_read_timeout 1200;
|
||||||
proxy_next_upstream off;
|
|
||||||
|
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
proxy_set_header Connection $connection_upgrade;
|
proxy_set_header Connection $connection_upgrade;
|
||||||
proxy_set_header Host $host;
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_next_upstream off;
|
||||||
|
proxy_redirect off;
|
|
@ -131,6 +131,6 @@ server {
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://127.0.0.1:9292/;
|
proxy_pass http://127.0.0.1:9292/;
|
||||||
proxy_next_upstream off;
|
include /etc/nginx/zulip-include/proxy;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
proxy_set_header Host $host;
|
include /etc/nginx/zulip-include/proxy;
|
||||||
proxy_set_header X-Forwarded-For $remote_addr;
|
proxy_set_header X-Forwarded-For $remote_addr;
|
||||||
proxy_next_upstream off;
|
proxy_buffering off;
|
||||||
|
|
Loading…
Reference in New Issue