Skip to content

Commit bbf6723

Browse files
Kristan Kenneyunknown
authored andcommitted
Fix server error pages not loading properly
1 parent d503b7c commit bbf6723

File tree

4 files changed

+23
-23
lines changed

4 files changed

+23
-23
lines changed

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

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ server {
99
location / {
1010
proxy_pass http://%ip%:%web_port%;
1111
try_files $uri $uri/ /index.php?q=$uri&$args;
12-
alias /var/lib/roundcube/;
13-
location ~* ^.+\.(ogg|ogv|svg|svgz|swf|eot|otf|woff|mov|mp3|mp4|webm|flv|ttf|rss|atom|jpg|jpeg|gif|png|ico|bmp|mid|midi|wav|rtf|css|js|jar)$ {
12+
alias /var/lib/roundcube/;
13+
location ~* ^.+\.(ogg|ogv|svg|svgz|swf|eot|otf|woff|mov|mp3|mp4|webm|flv|ttf|rss|atom|jpg|jpeg|gif|png|ico|bmp|mid|midi|wav|rtf|css|js|jar)$ {
1414
expires 1h;
1515
fastcgi_hide_header "Set-Cookie";
1616
}
@@ -50,14 +50,13 @@ server {
5050
proxy_pass http://%ip%:%web_port%;
5151
}
5252

53-
location /error/ {
54-
root /var/www/document_errors;
55-
}
56-
5753
error_page 403 /error/404.html;
5854
error_page 404 /error/404.html;
5955
error_page 500 502 503 504 /error/50x.html;
60-
56+
57+
location /error/ {
58+
alias /var/www/document_errors/;
59+
}
6160

6261
include %home%/%user%/conf/mail/%root_domain%/%proxy_system%.conf_*;
6362
}

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ server {
1010
proxy_pass http://%ip%:%web_port%;
1111
try_files $uri $uri/ /index.php?q=$uri&$args;
1212
alias /var/lib/roundcube/;
13-
location ~* ^.+\.(ogg|ogv|svg|svgz|swf|eot|otf|woff|mov|mp3|mp4|webm|flv|ttf|rss|atom|jpg|jpeg|gif|png|ico|bmp|mid|midi|wav|rtf|css|js|jar)$ {
13+
location ~* ^.+\.(ogg|ogv|svg|svgz|swf|eot|otf|woff|mov|mp3|mp4|webm|flv|ttf|rss|atom|jpg|jpeg|gif|png|ico|bmp|mid|midi|wav|rtf|css|js|jar)$ {
1414
expires 1h;
1515
fastcgi_hide_header "Set-Cookie";
1616
}
@@ -50,13 +50,13 @@ server {
5050
proxy_pass http://%ip%:%web_port%;
5151
}
5252

53-
location /error/ {
54-
root /var/www/document_errors;
55-
}
56-
5753
error_page 403 /error/404.html;
5854
error_page 404 /error/404.html;
5955
error_page 500 502 503 504 /error/50x.html;
6056

57+
location /error/ {
58+
alias /var/www/document_errors/;
59+
}
60+
6161
include %home%/%user%/conf/mail/%root_domain%/%proxy_system%.conf_*;
6262
}

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ server {
1212

1313
location / {
1414
try_files $uri $uri/ /index.php?q=$uri&$args;
15-
location ~* ^.+\.(ogg|ogv|svg|svgz|swf|eot|otf|woff|mov|mp3|mp4|webm|flv|ttf|rss|atom|jpg|jpeg|gif|png|ico|bmp|mid|midi|wav|rtf|css|js|jar)$ {
15+
location ~* ^.+\.(ogg|ogv|svg|svgz|swf|eot|otf|woff|mov|mp3|mp4|webm|flv|ttf|rss|atom|jpg|jpeg|gif|png|ico|bmp|mid|midi|wav|rtf|css|js|jar)$ {
1616
expires 1h;
1717
fastcgi_hide_header "Set-Cookie";
1818
}
@@ -48,13 +48,13 @@ server {
4848
fastcgi_param SCRIPT_FILENAME $request_filename;
4949
}
5050

51-
location /error/ {
52-
root /var/www/document_errors;
53-
}
54-
5551
error_page 403 /error/404.html;
5652
error_page 404 /error/404.html;
5753
error_page 500 502 503 504 /error/50x.html;
5854

55+
location /error/ {
56+
alias /var/www/document_errors/;
57+
}
58+
5959
include %home%/%user%/conf/mail/%root_domain%/%web_system%.conf_*;
6060
}

install/deb/templates/mail/nginx/web_system.tpl

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ server {
1212

1313
location / {
1414
try_files $uri $uri/ /index.php?q=$uri&$args;
15-
location ~* ^.+\.(ogg|ogv|svg|svgz|swf|eot|otf|woff|mov|mp3|mp4|webm|flv|ttf|rss|atom|jpg|jpeg|gif|png|ico|bmp|mid|midi|wav|rtf|css|js|jar)$ {
15+
location ~* ^.+\.(ogg|ogv|svg|svgz|swf|eot|otf|woff|mov|mp3|mp4|webm|flv|ttf|rss|atom|jpg|jpeg|gif|png|ico|bmp|mid|midi|wav|rtf|css|js|jar)$ {
1616
expires 1h;
1717
fastcgi_hide_header "Set-Cookie";
1818
}
@@ -48,13 +48,14 @@ server {
4848
fastcgi_param SCRIPT_FILENAME $request_filename;
4949
}
5050

51-
location /error/ {
52-
root /var/www/document_errors;
53-
}
54-
5551
error_page 403 /error/404.html;
5652
error_page 404 /error/404.html;
5753
error_page 500 502 503 504 /error/50x.html;
58-
54+
55+
location /error/ {
56+
alias /var/www/document_errors/;
57+
58+
}
59+
5960
include %home%/%user%/conf/mail/%root_domain%/%web_system%.conf_*;
6061
}

0 commit comments

Comments
 (0)