Add timeouts to reverse proxy settings

Dieser Commit ist enthalten in:
André Peters 2019-05-25 10:51:07 +02:00 committet von GitHub
Ursprung 324c3889f5
Commit 36ef6f0949
Es konnte kein GPG-SchlĂĽssel zu dieser Signatur gefunden werden
GPG-SchlĂĽssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -38,7 +38,7 @@ Let's Encrypt will follow our rewrite, certificate requests will work fine.
**Take care of highlighted lines.** **Take care of highlighted lines.**
``` apache hl_lines="2 12 13 19 23 24 29 30" ``` apache hl_lines="2 12 13 19 23 24 25 26 31 32"
<VirtualHost *:80> <VirtualHost *:80>
ServerName CHANGE_TO_MAILCOW_HOSTNAME ServerName CHANGE_TO_MAILCOW_HOSTNAME
ServerAlias autodiscover.* ServerAlias autodiscover.*
@ -61,6 +61,8 @@ Let's Encrypt will follow our rewrite, certificate requests will work fine.
ServerAlias autodiscover.* ServerAlias autodiscover.*
# You should proxy to a plain HTTP session to offload SSL processing # You should proxy to a plain HTTP session to offload SSL processing
ProxyPass /Microsoft-Server-ActiveSync http://127.0.0.1:8080/Microsoft-Server-ActiveSync connectiontimeout=400
ProxyPassReverse /Microsoft-Server-ActiveSync http://127.0.0.1:8080/Microsoft-Server-ActiveSync
ProxyPass / http://127.0.0.1:8080/ ProxyPass / http://127.0.0.1:8080/
ProxyPassReverse / http://127.0.0.1:8080/ ProxyPassReverse / http://127.0.0.1:8080/
ProxyPreserveHost On ProxyPreserveHost On
@ -88,7 +90,7 @@ Let's Encrypt will follow our rewrite, certificate requests will work fine.
**Take care of highlighted lines.** **Take care of highlighted lines.**
``` hl_lines="4 13 23 26 27" ``` hl_lines="4 13 23 26 27 32 45"
server { server {
listen 80 default_server; listen 80 default_server;
listen [::]:80 default_server; listen [::]:80 default_server;
@ -119,6 +121,19 @@ server {
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!MD5; ssl_ciphers HIGH:!aNULL:!MD5;
location /Microsoft-Server-ActiveSync {
proxy_pass http://127.0.0.1:8080/;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
client_max_body_size 0;
proxy_connect_timeout 4000;
proxy_next_upstream timeout error;
proxy_send_timeout 4000;
proxy_read_timeout 4000;
}
location / { location / {
proxy_pass http://127.0.0.1:8080/; proxy_pass http://127.0.0.1:8080/;
proxy_set_header Host $http_host; proxy_set_header Host $http_host;