Skip to content

Commit 262b730

Browse files
authored
Fix: 421 error on all web and mail domains after Apache 2.4.64 update (hestiacp#5058)
* Fix: 421 error on all web and mail domains after Apache 2.4.64 update * Modify 1.9.4.sh script to also update mail templates
1 parent deffc08 commit 262b730

File tree

7 files changed

+23
-1
lines changed

7 files changed

+23
-1
lines changed

install/deb/templates/mail/nginx/default.stpl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ server {
3131

3232
try_files $uri $uri/ =404;
3333

34+
proxy_ssl_server_name on;
35+
proxy_ssl_name $host;
3436
proxy_pass https://%ip%:%web_ssl_port%;
3537

3638
location ~* ^.+\.(ogg|ogv|svg|svgz|swf|eot|otf|woff|woff2|mov|mp3|mp4|webm|flv|ttf|rss|atom|jpg|jpeg|gif|png|webp|ico|bmp|mid|midi|wav|rtf|css|js|jar)$ {
@@ -40,6 +42,8 @@ server {
4042
}
4143

4244
location @fallback {
45+
proxy_ssl_server_name on;
46+
proxy_ssl_name $host;
4347
proxy_pass https://%ip%:%web_ssl_port%;
4448
}
4549

install/deb/templates/mail/nginx/default_disabled.stpl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ server {
2121
}
2222

2323
location / {
24+
proxy_ssl_server_name on;
25+
proxy_ssl_name $host;
2426
proxy_pass http://%ip%:%web_port%;
2527
}
2628

install/deb/templates/mail/nginx/default_snappymail.stpl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ server {
3131

3232
try_files $uri $uri/ =404;
3333

34+
proxy_ssl_server_name on;
35+
proxy_ssl_name $host;
3436
proxy_pass https://%ip%:%web_ssl_port%;
3537

3638
location ~* ^.+\.(ogg|ogv|svg|svgz|swf|eot|otf|woff|woff2|mov|mp3|mp4|webm|flv|ttf|rss|atom|jpg|jpeg|gif|png|webp|ico|bmp|mid|midi|wav|rtf|css|js|jar)$ {
@@ -40,6 +42,8 @@ server {
4042
}
4143

4244
location @fallback {
45+
proxy_ssl_server_name on;
46+
proxy_ssl_name $host;
4347
proxy_pass https://%ip%:%web_ssl_port%;
4448
}
4549

install/deb/templates/web/nginx/caching.stpl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ server {
2727
}
2828

2929
location / {
30+
proxy_ssl_server_name on;
31+
proxy_ssl_name $host;
3032
proxy_pass https://%ip%:%web_ssl_port%;
3133

3234
proxy_cache %domain%;
@@ -64,6 +66,8 @@ server {
6466
}
6567

6668
location @fallback {
69+
proxy_ssl_server_name on;
70+
proxy_ssl_name $host;
6771
proxy_pass https://%ip%:%web_ssl_port%;
6872
}
6973

install/deb/templates/web/nginx/default.stpl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ server {
2727
}
2828

2929
location / {
30+
proxy_ssl_server_name on;
31+
proxy_ssl_name $host;
3032
proxy_pass https://%ip%:%web_ssl_port%;
3133

3234
location ~* ^.+\.(%proxy_extensions%)$ {
@@ -41,6 +43,8 @@ server {
4143
}
4244

4345
location @fallback {
46+
proxy_ssl_server_name on;
47+
proxy_ssl_name $host;
4448
proxy_pass https://%ip%:%web_ssl_port%;
4549
}
4650

install/deb/templates/web/nginx/hosting.stpl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ server {
2727
}
2828

2929
location / {
30+
proxy_ssl_server_name on;
31+
proxy_ssl_name $host;
3032
proxy_pass https://%ip%:%web_ssl_port%;
3133

3234
location ~* ^.+\.(%proxy_extensions%)$ {
@@ -41,6 +43,8 @@ server {
4143
}
4244

4345
location @fallback {
46+
proxy_ssl_server_name on;
47+
proxy_ssl_name $host;
4448
proxy_pass https://%ip%:%web_ssl_port%;
4549
}
4650

install/upgrade/versions/1.9.4.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
upgrade_config_set_value 'UPGRADE_UPDATE_WEB_TEMPLATES' 'true'
2121
upgrade_config_set_value 'UPGRADE_UPDATE_DNS_TEMPLATES' 'false'
22-
upgrade_config_set_value 'UPGRADE_UPDATE_MAIL_TEMPLATES' 'false'
22+
upgrade_config_set_value 'UPGRADE_UPDATE_MAIL_TEMPLATES' 'true'
2323
upgrade_config_set_value 'UPGRADE_REBUILD_USERS' 'no'
2424
upgrade_config_set_value 'UPGRADE_UPDATE_FILEMANAGER_CONFIG' 'true'
2525

0 commit comments

Comments
 (0)