2015-09-14 17:12:17 +02:00
|
|
|
location / {
|
2016-12-14 10:11:43 +01:00
|
|
|
if ($scheme = http) {
|
|
|
|
rewrite ^ https://$server_name$request_uri? permanent;
|
|
|
|
}
|
2017-05-18 23:28:18 +02:00
|
|
|
try_files $uri @{{ app }};
|
2016-12-14 10:11:43 +01:00
|
|
|
}
|
2020-06-12 17:41:57 +02:00
|
|
|
client_max_body_size 50M;
|
|
|
|
|
2017-05-18 23:28:18 +02:00
|
|
|
location @{{ app }} {
|
|
|
|
proxy_pass http://127.0.0.1:{{ port }};
|
2016-11-29 00:55:39 +01:00
|
|
|
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
|
|
|
|
proxy_buffers 16 64k;
|
2015-09-14 17:12:17 +02:00
|
|
|
proxy_buffer_size 128k;
|
2016-11-29 00:55:39 +01:00
|
|
|
proxy_redirect off;
|
2015-09-14 17:12:17 +02:00
|
|
|
proxy_set_header Host $host;
|
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
2016-11-29 00:55:39 +01:00
|
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
2015-09-14 17:12:17 +02:00
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
2018-12-14 03:36:58 +01:00
|
|
|
proxy_set_header X-Forwarded-Host $host;
|
|
|
|
proxy_read_timeout 720s;
|
|
|
|
proxy_connect_timeout 720s;
|
|
|
|
proxy_send_timeout 720s;
|
|
|
|
}
|
|
|
|
location /longpolling {
|
2018-12-16 23:08:56 +01:00
|
|
|
proxy_pass http://127.0.0.1:{{ port_chat }};
|
2018-12-14 03:36:58 +01:00
|
|
|
proxy_set_header Host $host;
|
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
proxy_set_header X-Forwarded-Host $host;
|
|
|
|
proxy_read_timeout 720s;
|
|
|
|
proxy_connect_timeout 720s;
|
|
|
|
proxy_send_timeout 720s;
|
|
|
|
}
|
|
|
|
location ~* /web/static/ {
|
|
|
|
proxy_cache_valid 200 90m;
|
|
|
|
proxy_buffering on;
|
|
|
|
expires 864000;
|
|
|
|
proxy_pass http://127.0.0.1:{{ port }};
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
proxy_set_header X-Forwarded-Host $host;
|
|
|
|
proxy_read_timeout 720s;
|
|
|
|
proxy_connect_timeout 720s;
|
|
|
|
proxy_send_timeout 720s;
|
2016-11-29 00:55:39 +01:00
|
|
|
}
|