Prolong nginx timeouts and simplify proxy rules
This commit is contained in:
parent
2f71537f07
commit
9c0b1ac8ce
@ -14,9 +14,7 @@ http {
|
|||||||
|
|
||||||
server_tokens off;
|
server_tokens off;
|
||||||
client_max_body_size 100m;
|
client_max_body_size 100m;
|
||||||
keepalive_timeout 65;
|
|
||||||
sendfile on;
|
sendfile on;
|
||||||
tcp_nodelay on;
|
|
||||||
gzip_vary on;
|
gzip_vary on;
|
||||||
|
|
||||||
ssl_protocols TLSv1.2;
|
ssl_protocols TLSv1.2;
|
||||||
@ -29,5 +27,13 @@ http {
|
|||||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" "$http_x_forwarded_for"';
|
log_format main '$remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" "$http_x_forwarded_for"';
|
||||||
access_log /var/log/nginx/access.log main;
|
access_log /var/log/nginx/access.log main;
|
||||||
|
|
||||||
|
proxy_set_header X-Forwarded-For $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-Host $host:$server_port;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
proxy_connect_timeout 300;
|
||||||
|
proxy_send_timeout 300;
|
||||||
|
proxy_read_timeout 300;
|
||||||
|
send_timeout 300;
|
||||||
|
|
||||||
include /etc/nginx/conf.d/*.conf;
|
include /etc/nginx/conf.d/*.conf;
|
||||||
}
|
}
|
||||||
|
@ -6,9 +6,6 @@ server {
|
|||||||
error_log /var/log/nginx/ckan.error.log;
|
error_log /var/log/nginx/ckan.error.log;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_set_header X-Forwarded-For $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-Host $host:$server_port;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
proxy_pass http://127.0.0.1:8003;
|
proxy_pass http://127.0.0.1:8003;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,9 +6,6 @@ server {
|
|||||||
error_log /var/log/nginx/crisiscleanup.error.log;
|
error_log /var/log/nginx/crisiscleanup.error.log;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_set_header X-Forwarded-For $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-Host $host:$server_port;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
proxy_pass http://127.0.0.1:8005;
|
proxy_pass http://127.0.0.1:8005;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,9 +14,8 @@ http {
|
|||||||
access_log off;
|
access_log off;
|
||||||
server_tokens off;
|
server_tokens off;
|
||||||
client_max_body_size 100m;
|
client_max_body_size 100m;
|
||||||
keepalive_timeout 65;
|
|
||||||
sendfile on;
|
sendfile on;
|
||||||
tcp_nodelay on;
|
send_timeout 300;
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 8006;
|
listen 8006;
|
||||||
@ -56,6 +55,9 @@ http {
|
|||||||
proxy_set_header X-Forwarded-For $remote_addr;
|
proxy_set_header X-Forwarded-For $remote_addr;
|
||||||
proxy_set_header X-Forwarded-Host $host:$server_port;
|
proxy_set_header X-Forwarded-Host $host:$server_port;
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
proxy_connect_timeout 300;
|
||||||
|
proxy_send_timeout 300;
|
||||||
|
proxy_read_timeout 300;
|
||||||
proxy_pass http://127.0.0.1:8000;
|
proxy_pass http://127.0.0.1:8000;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,9 +6,6 @@ server {
|
|||||||
error_log /var/log/nginx/cts.error.log;
|
error_log /var/log/nginx/cts.error.log;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_set_header X-Forwarded-For $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-Host $host:$server_port;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
proxy_pass http://127.0.0.1:8006;
|
proxy_pass http://127.0.0.1:8006;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,9 +6,6 @@ server {
|
|||||||
error_log /var/log/nginx/gnuhealth.error.log;
|
error_log /var/log/nginx/gnuhealth.error.log;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_set_header X-Forwarded-For $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-Host $host:$server_port;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
proxy_pass http://127.0.0.1:8008;
|
proxy_pass http://127.0.0.1:8008;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,9 +14,7 @@ http {
|
|||||||
access_log off;
|
access_log off;
|
||||||
server_tokens off;
|
server_tokens off;
|
||||||
client_max_body_size 100m;
|
client_max_body_size 100m;
|
||||||
keepalive_timeout 65;
|
|
||||||
sendfile on;
|
sendfile on;
|
||||||
tcp_nodelay on;
|
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 8009;
|
listen 8009;
|
||||||
|
@ -6,9 +6,6 @@ server {
|
|||||||
error_log /var/log/nginx/kanboard.error.log;
|
error_log /var/log/nginx/kanboard.error.log;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_set_header X-Forwarded-For $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-Host $host:$server_port;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
proxy_set_header X-Forwarded-HTTPS $https;
|
proxy_set_header X-Forwarded-HTTPS $https;
|
||||||
proxy_set_header X-Forwarded-Server-Name $host;
|
proxy_set_header X-Forwarded-Server-Name $host;
|
||||||
proxy_set_header X-Forwarded-Server-Port $server_port;
|
proxy_set_header X-Forwarded-Server-Port $server_port;
|
||||||
|
@ -6,9 +6,6 @@ server {
|
|||||||
error_log /var/log/nginx/mifosx.error.log;
|
error_log /var/log/nginx/mifosx.error.log;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_set_header X-Forwarded-For $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-Host $host:$server_port;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
proxy_pass http://127.0.0.1:8012;
|
proxy_pass http://127.0.0.1:8012;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,9 +6,6 @@ server {
|
|||||||
error_log /var/log/nginx/motech.error.log;
|
error_log /var/log/nginx/motech.error.log;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_set_header X-Forwarded-For $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-Host $host:$server_port;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
proxy_pass http://127.0.0.1:8013;
|
proxy_pass http://127.0.0.1:8013;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,9 +6,6 @@ server {
|
|||||||
error_log /var/log/nginx/openmapkit.error.log;
|
error_log /var/log/nginx/openmapkit.error.log;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_set_header X-Forwarded-For $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-Host $host:$server_port;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
proxy_pass http://127.0.0.1:8007;
|
proxy_pass http://127.0.0.1:8007;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,9 +14,8 @@ http {
|
|||||||
access_log off;
|
access_log off;
|
||||||
server_tokens off;
|
server_tokens off;
|
||||||
client_max_body_size 100m;
|
client_max_body_size 100m;
|
||||||
keepalive_timeout 65;
|
|
||||||
sendfile on;
|
sendfile on;
|
||||||
tcp_nodelay on;
|
send_timeout 300;
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 8002;
|
listen 8002;
|
||||||
@ -42,8 +41,9 @@ http {
|
|||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
proxy_redirect off;
|
proxy_redirect off;
|
||||||
proxy_buffering off;
|
proxy_buffering off;
|
||||||
proxy_read_timeout 90;
|
proxy_connect_timeout 300;
|
||||||
proxy_connect_timeout 90;
|
proxy_send_timeout 300;
|
||||||
|
proxy_read_timeout 300;
|
||||||
if (!-f $request_filename) {
|
if (!-f $request_filename) {
|
||||||
proxy_pass http://127.0.0.1:2620;
|
proxy_pass http://127.0.0.1:2620;
|
||||||
break;
|
break;
|
||||||
|
@ -6,9 +6,6 @@ server {
|
|||||||
error_log /var/log/nginx/pandora.error.log;
|
error_log /var/log/nginx/pandora.error.log;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_set_header X-Forwarded-For $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-Host $host:$server_port;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
proxy_pass http://127.0.0.1:8002;
|
proxy_pass http://127.0.0.1:8002;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
bind="127.0.0.1:2620"
|
bind="127.0.0.1:2620"
|
||||||
log_level="info"
|
log_level="info"
|
||||||
max_requests=1000
|
max_requests=1000
|
||||||
timeout=90
|
timeout=300
|
||||||
workers=5
|
workers=5
|
||||||
|
@ -6,9 +6,6 @@ server {
|
|||||||
error_log /var/log/nginx/sahana.error.log;
|
error_log /var/log/nginx/sahana.error.log;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_set_header X-Forwarded-For $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-Host $host:$server_port;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
proxy_pass http://127.0.0.1:8001;
|
proxy_pass http://127.0.0.1:8001;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,9 +6,6 @@ server {
|
|||||||
error_log /var/log/nginx/sambro.error.log;
|
error_log /var/log/nginx/sambro.error.log;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_set_header X-Forwarded-For $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-Host $host:$server_port;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
proxy_pass http://127.0.0.1:8099;
|
proxy_pass http://127.0.0.1:8099;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,9 +14,7 @@ http {
|
|||||||
access_log off;
|
access_log off;
|
||||||
server_tokens off;
|
server_tokens off;
|
||||||
client_max_body_size 100m;
|
client_max_body_size 100m;
|
||||||
keepalive_timeout 65;
|
|
||||||
sendfile on;
|
sendfile on;
|
||||||
tcp_nodelay on;
|
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 8010;
|
listen 8010;
|
||||||
|
@ -6,9 +6,6 @@ server {
|
|||||||
error_log /var/log/nginx/seeddms.error.log;
|
error_log /var/log/nginx/seeddms.error.log;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_set_header X-Forwarded-For $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-Host $host:$server_port;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
proxy_set_header X-Forwarded-HTTPS $https;
|
proxy_set_header X-Forwarded-HTTPS $https;
|
||||||
proxy_set_header X-Forwarded-Server-Name $host;
|
proxy_set_header X-Forwarded-Server-Name $host;
|
||||||
proxy_set_header X-Forwarded-Server-Port $server_port;
|
proxy_set_header X-Forwarded-Server-Port $server_port;
|
||||||
|
@ -6,9 +6,6 @@ server {
|
|||||||
error_log /var/log/nginx/sigmah.error.log;
|
error_log /var/log/nginx/sigmah.error.log;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_set_header X-Forwarded-For $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-Host $host:$server_port;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
proxy_pass http://127.0.0.1:8011;
|
proxy_pass http://127.0.0.1:8011;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,9 +14,7 @@ http {
|
|||||||
access_log off;
|
access_log off;
|
||||||
server_tokens off;
|
server_tokens off;
|
||||||
client_max_body_size 100m;
|
client_max_body_size 100m;
|
||||||
keepalive_timeout 65;
|
|
||||||
sendfile on;
|
sendfile on;
|
||||||
tcp_nodelay on;
|
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 8014;
|
listen 8014;
|
||||||
|
@ -6,9 +6,6 @@ server {
|
|||||||
error_log /var/log/nginx/ushahidi.error.log;
|
error_log /var/log/nginx/ushahidi.error.log;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_set_header X-Forwarded-For $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-Host $host:$server_port;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
proxy_set_header X-Forwarded-HTTPS $https;
|
proxy_set_header X-Forwarded-HTTPS $https;
|
||||||
proxy_set_header X-Forwarded-Server-Name $host;
|
proxy_set_header X-Forwarded-Server-Name $host;
|
||||||
proxy_set_header X-Forwarded-Server-Port $server_port;
|
proxy_set_header X-Forwarded-Server-Port $server_port;
|
||||||
|
Loading…
Reference in New Issue
Block a user