2018-02-17 17:56:17 +01:00
|
|
|
upstream ${SERVICE}server {
|
|
|
|
server ${SERVICE}:8069 fail_timeout=300s;
|
2016-09-30 15:03:26 +02:00
|
|
|
}
|
|
|
|
|
2018-02-17 17:56:17 +01:00
|
|
|
upstream ${SERVICE}longpoll {
|
|
|
|
server ${SERVICE}:8072 fail_timeout=300s;
|
2016-09-30 15:03:26 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
server {
|
2017-07-01 15:55:22 +02:00
|
|
|
listen ${NGINX_PORT};
|
2018-02-17 17:56:17 +01:00
|
|
|
server_name ${SERVER_NAMES};
|
2021-03-29 22:26:53 +02:00
|
|
|
return 301 https://${DOLLSIGN}host:${NGINX_EXTERNAL_SSL_PORT}${DOLLSIGN}request_uri;
|
2016-09-30 15:03:26 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
server {
|
2021-04-17 17:43:42 +02:00
|
|
|
listen ${NGINX_SSL_PORT} ssl http2;
|
2018-02-17 17:56:17 +01:00
|
|
|
server_name ${SERVER_NAMES};
|
2019-05-17 10:19:22 +02:00
|
|
|
client_max_body_size 500M;
|
2016-12-04 19:35:49 +01:00
|
|
|
gzip on;
|
2019-03-14 08:06:05 +01:00
|
|
|
gzip_min_length 512;
|
|
|
|
gzip_buffers 4 32k;
|
|
|
|
gzip_types text/plain text/xml text/css text/less application/x-javascript application/xml application/json application/javascript;
|
2016-12-04 19:35:49 +01:00
|
|
|
gzip_vary on;
|
2019-03-12 16:29:43 +01:00
|
|
|
keepalive_timeout 120s;
|
2019-04-24 04:49:55 +02:00
|
|
|
proxy_read_timeout ${PROXY_READ_TIMEOUT};
|
|
|
|
proxy_connect_timeout ${PROXY_CONNECT_TIMEOUT};
|
|
|
|
proxy_send_timeout ${PROXY_SEND_TIMEOUT};
|
2019-03-12 16:29:43 +01:00
|
|
|
proxy_buffer_size 64k;
|
|
|
|
proxy_buffering off;
|
|
|
|
proxy_buffers 4 64k;
|
|
|
|
proxy_busy_buffers_size 64k;
|
2017-07-01 16:19:13 +02:00
|
|
|
proxy_set_header Host ${DOLLSIGN}http_host;
|
|
|
|
proxy_set_header X-Forwarded-Host ${DOLLSIGN}http_host;
|
2017-03-31 11:21:50 +02:00
|
|
|
proxy_set_header X-Forwarded-For ${DOLLSIGN}proxy_add_x_forwarded_for;
|
|
|
|
proxy_set_header X-Forwarded-Proto ${DOLLSIGN}scheme;
|
|
|
|
proxy_set_header X-Real-IP ${DOLLSIGN}remote_addr;
|
|
|
|
location / {
|
2018-02-17 17:56:17 +01:00
|
|
|
proxy_pass http://${SERVICE}server;
|
2017-07-01 16:19:13 +02:00
|
|
|
proxy_redirect off;
|
|
|
|
# proxy_redirect http://${DOLLSIGN}http_host/ https://${DOLLSIGN}host:${DOLLSIGN}server_port/;
|
2016-09-30 15:03:26 +02:00
|
|
|
}
|
|
|
|
location /longpolling {
|
2018-02-17 17:56:17 +01:00
|
|
|
proxy_pass http://${SERVICE}longpoll;
|
2016-09-30 15:03:26 +02:00
|
|
|
}
|
2019-03-12 16:29:43 +01:00
|
|
|
location ~ /[a-zA-Z0-9_-]*/static/ {
|
|
|
|
proxy_pass http://${SERVICE}server;
|
|
|
|
proxy_cache_valid 200 60m;
|
|
|
|
proxy_buffering on;
|
|
|
|
expires 864000;
|
|
|
|
}
|
2016-09-30 15:03:26 +02:00
|
|
|
}
|