mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	puppet: Declare upstreams properly in app nginx config.
(imported from commit 859eeed0d5b92c1b5b2b0764aba06aebcde8e2e2)
This commit is contained in:
		@@ -3,6 +3,6 @@
 | 
				
			|||||||
# should pass REMOTE_USER to /accounts/login/sso/ once it has satisfactorily
 | 
					# should pass REMOTE_USER to /accounts/login/sso/ once it has satisfactorily
 | 
				
			||||||
# identified the user.
 | 
					# identified the user.
 | 
				
			||||||
location /accounts/login/sso/ {
 | 
					location /accounts/login/sso/ {
 | 
				
			||||||
    proxy_pass https://localhost:8888;
 | 
					    proxy_pass https://localhost_sso;
 | 
				
			||||||
    include /etc/nginx/zulip-include/proxy;
 | 
					    include /etc/nginx/zulip-include/proxy;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -15,7 +15,7 @@ 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://tornado;
 | 
				
			||||||
    include /etc/nginx/zulip-include/proxy_longpolling;
 | 
					    include /etc/nginx/zulip-include/proxy_longpolling;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    proxy_set_header X-Real-IP       $remote_addr;
 | 
					    proxy_set_header X-Real-IP       $remote_addr;
 | 
				
			||||||
@@ -23,14 +23,14 @@ 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://tornado;
 | 
				
			||||||
    include /etc/nginx/zulip-include/location-sockjs;
 | 
					    include /etc/nginx/zulip-include/location-sockjs;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Send everything else to Django via FastCGI
 | 
					# Send everything else to Django via FastCGI
 | 
				
			||||||
location / {
 | 
					location / {
 | 
				
			||||||
    include fastcgi_params;
 | 
					    include fastcgi_params;
 | 
				
			||||||
    fastcgi_pass unix:/home/zulip/deployments/fastcgi-socket;
 | 
					    fastcgi_pass django;
 | 
				
			||||||
    fastcgi_split_path_info ^()(.*)$;
 | 
					    fastcgi_split_path_info ^()(.*)$;
 | 
				
			||||||
    # Second number set to `getconf PAGESIZE`
 | 
					    # Second number set to `getconf PAGESIZE`
 | 
				
			||||||
    fastcgi_buffers 1024 4k;
 | 
					    fastcgi_buffers 1024 4k;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -14,6 +14,19 @@ server {
 | 
				
			|||||||
    return 301 https://$host$request_uri;
 | 
					    return 301 https://$host$request_uri;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					upstream django {
 | 
				
			||||||
 | 
					    server_name unix:/home/zulip/deployments/fastcgi-socket;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					upstream tornado {
 | 
				
			||||||
 | 
					    server_name localhost:9993;
 | 
				
			||||||
 | 
					    keepalive 10000;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					upstream localhost_sso {
 | 
				
			||||||
 | 
					    server_name localhost:8888;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
server {
 | 
					server {
 | 
				
			||||||
    listen 443;
 | 
					    listen 443;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user