Prolong nginx timeouts and simplify proxy rules

This commit is contained in:
Disassembler 2018-02-09 14:31:55 +01:00
parent 2f71537f07
commit 9c0b1ac8ce
Signed by: Disassembler
GPG Key ID: 524BD33A0EE29499
21 changed files with 17 additions and 57 deletions

View File

@ -14,9 +14,7 @@ http {
server_tokens off;
client_max_body_size 100m;
keepalive_timeout 65;
sendfile on;
tcp_nodelay on;
gzip_vary on;
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"';
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;
}

View File

@ -6,9 +6,6 @@ server {
error_log /var/log/nginx/ckan.error.log;
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;
}
}

View File

@ -6,9 +6,6 @@ server {
error_log /var/log/nginx/crisiscleanup.error.log;
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;
}
}

View File

@ -14,9 +14,8 @@ http {
access_log off;
server_tokens off;
client_max_body_size 100m;
keepalive_timeout 65;
sendfile on;
tcp_nodelay on;
send_timeout 300;
server {
listen 8006;
@ -56,6 +55,9 @@ http {
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;
proxy_pass http://127.0.0.1:8000;
}
}

View File

@ -6,9 +6,6 @@ server {
error_log /var/log/nginx/cts.error.log;
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;
}
}

View File

@ -6,9 +6,6 @@ server {
error_log /var/log/nginx/gnuhealth.error.log;
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;
}
}

View File

@ -14,9 +14,7 @@ http {
access_log off;
server_tokens off;
client_max_body_size 100m;
keepalive_timeout 65;
sendfile on;
tcp_nodelay on;
server {
listen 8009;

View File

@ -6,9 +6,6 @@ server {
error_log /var/log/nginx/kanboard.error.log;
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-Server-Name $host;
proxy_set_header X-Forwarded-Server-Port $server_port;

View File

@ -6,9 +6,6 @@ server {
error_log /var/log/nginx/mifosx.error.log;
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;
}
}

View File

@ -6,9 +6,6 @@ server {
error_log /var/log/nginx/motech.error.log;
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;
}
}

View File

@ -6,9 +6,6 @@ server {
error_log /var/log/nginx/openmapkit.error.log;
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;
}
}

View File

@ -14,9 +14,8 @@ http {
access_log off;
server_tokens off;
client_max_body_size 100m;
keepalive_timeout 65;
sendfile on;
tcp_nodelay on;
send_timeout 300;
server {
listen 8002;
@ -42,8 +41,9 @@ http {
proxy_set_header X-Forwarded-Proto $scheme;
proxy_redirect off;
proxy_buffering off;
proxy_read_timeout 90;
proxy_connect_timeout 90;
proxy_connect_timeout 300;
proxy_send_timeout 300;
proxy_read_timeout 300;
if (!-f $request_filename) {
proxy_pass http://127.0.0.1:2620;
break;

View File

@ -6,9 +6,6 @@ server {
error_log /var/log/nginx/pandora.error.log;
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;
}
}

View File

@ -1,5 +1,5 @@
bind="127.0.0.1:2620"
log_level="info"
max_requests=1000
timeout=90
timeout=300
workers=5

View File

@ -6,9 +6,6 @@ server {
error_log /var/log/nginx/sahana.error.log;
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;
}
}

View File

@ -6,9 +6,6 @@ server {
error_log /var/log/nginx/sambro.error.log;
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;
}
}

View File

@ -14,9 +14,7 @@ http {
access_log off;
server_tokens off;
client_max_body_size 100m;
keepalive_timeout 65;
sendfile on;
tcp_nodelay on;
server {
listen 8010;

View File

@ -6,9 +6,6 @@ server {
error_log /var/log/nginx/seeddms.error.log;
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-Server-Name $host;
proxy_set_header X-Forwarded-Server-Port $server_port;

View File

@ -6,9 +6,6 @@ server {
error_log /var/log/nginx/sigmah.error.log;
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;
}
}

View File

@ -14,9 +14,7 @@ http {
access_log off;
server_tokens off;
client_max_body_size 100m;
keepalive_timeout 65;
sendfile on;
tcp_nodelay on;
server {
listen 8014;

View File

@ -6,9 +6,6 @@ server {
error_log /var/log/nginx/ushahidi.error.log;
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-Server-Name $host;
proxy_set_header X-Forwarded-Server-Port $server_port;