Skip to content

Commit ad99865

Browse files
committed
- Changed FastCGI buffers for ISPConfig nginx vhost because otherwise you get "upstream sent too big header while reading response header from upstream" on OpenSUSE.
- Added 502 error page ("Bad Gateway"). - Added "fastcgi_intercept_errors on;" to nginx vhost template so that ISPConfig's error pages are displayed instead of the default nginx ones.
1 parent e09a274 commit ad99865

File tree

20 files changed

+940
-7
lines changed

20 files changed

+940
-7
lines changed

install/tpl/nginx_apps.vhost.master

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,16 @@ server {
1515
}
1616

1717
location ~ \.php$ {
18+
try_files $uri =404;
19+
include /etc/nginx/fastcgi_params;
1820
fastcgi_pass 127.0.0.1:{fpm_port};
1921
fastcgi_index index.php;
2022
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
2123
fastcgi_param PATH_INFO $fastcgi_script_name;
22-
include /etc/nginx/fastcgi_params;
24+
fastcgi_buffer_size 128k;
25+
fastcgi_buffers 256 4k;
26+
fastcgi_busy_buffers_size 256k;
27+
fastcgi_temp_file_write_size 256k;
2328
}
2429

2530
location ~ /\. {

install/tpl/nginx_ispconfig.vhost.master

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,15 @@ server {
1818

1919
location ~ \.php$ {
2020
try_files $uri =404;
21+
include /etc/nginx/fastcgi_params;
2122
fastcgi_pass 127.0.0.1:{fpm_port};
2223
fastcgi_index index.php;
2324
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
2425
fastcgi_param PATH_INFO $fastcgi_script_name;
25-
include /etc/nginx/fastcgi_params;
26+
fastcgi_buffer_size 128k;
27+
fastcgi_buffers 256 4k;
28+
fastcgi_busy_buffers_size 256k;
29+
fastcgi_temp_file_write_size 256k;
2630
}
2731

2832
location ~ /\. {
@@ -35,11 +39,11 @@ server {
3539
location ~ ^/phpmyadmin/(.+\.php)$ {
3640
try_files $uri =404;
3741
root /usr/share/;
42+
include /etc/nginx/fastcgi_params;
3843
fastcgi_pass 127.0.0.1:{fpm_port};
3944
{ssl_comment}fastcgi_param HTTPS {fastcgi_ssl};
4045
fastcgi_index index.php;
4146
fastcgi_param SCRIPT_FILENAME $request_filename;
42-
include /etc/nginx/fastcgi_params;
4347
}
4448
location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
4549
root /usr/share/;
@@ -55,11 +59,11 @@ server {
5559
location ~ ^/squirrelmail/(.+\.php)$ {
5660
try_files $uri =404;
5761
root /usr/share/;
62+
include /etc/nginx/fastcgi_params;
5863
fastcgi_pass 127.0.0.1:{fpm_port};
5964
{ssl_comment}fastcgi_param HTTPS {fastcgi_ssl};
6065
fastcgi_index index.php;
6166
fastcgi_param SCRIPT_FILENAME $request_filename;
62-
include /etc/nginx/fastcgi_params;
6367
}
6468
location ~* ^/squirrelmail/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
6569
root /usr/share/;

server/conf/error/br/502.html

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4+
<head>
5+
<title>ERROR 502 - Bad Gateway!</title>
6+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7+
<meta name="robots" content="noindex" />
8+
<style type="text/css"><!--
9+
body {
10+
color: #444444;
11+
background-color: #EEEEEE;
12+
font-family: 'Trebuchet MS', sans-serif;
13+
font-size: 80%;
14+
}
15+
h1 {}
16+
h2 { font-size: 1.2em; }
17+
#page{
18+
background-color: #FFFFFF;
19+
width: 60%;
20+
margin: 24px auto;
21+
padding: 12px;
22+
}
23+
#header {
24+
padding: 6px ;
25+
text-align: center;
26+
}
27+
.status3xx { background-color: #475076; color: #FFFFFF; }
28+
.status4xx { background-color: #C55042; color: #FFFFFF; }
29+
.status5xx { background-color: #F2E81A; color: #000000; }
30+
#content {
31+
padding: 4px 0 24px 0;
32+
}
33+
#footer {
34+
color: #666666;
35+
background: #f9f9f9;
36+
padding: 10px 20px;
37+
border-top: 5px #efefef solid;
38+
font-size: 0.8em;
39+
text-align: center;
40+
}
41+
#footer a {
42+
color: #999999;
43+
}
44+
--></style>
45+
</head>
46+
<body>
47+
<div id="page">
48+
<div id="header" class="status5xx">
49+
<h1>ERROR 502 - Bad Gateway!</h1>
50+
</div>
51+
<div id="content">
52+
<h2>The following error occurred:</h2>
53+
<p>This server received an invalid response from an upstream server it accessed to fulfill the request.</p>
54+
<P>If you get this message repeatedly please contact the <!--WEBMASTER//-->webmaster<!--WEBMASTER//-->.</p>
55+
</div>
56+
<div id="footer">
57+
<p>Powered by <a href="http://www.ispconfig.org">ISPConfig</a></p>
58+
</div>
59+
</div>
60+
</body>
61+
</html>

server/conf/error/cz/502.html

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4+
<head>
5+
<title>ERROR 502 - Bad Gateway!</title>
6+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7+
<meta name="robots" content="noindex" />
8+
<style type="text/css"><!--
9+
body {
10+
color: #444444;
11+
background-color: #EEEEEE;
12+
font-family: 'Trebuchet MS', sans-serif;
13+
font-size: 80%;
14+
}
15+
h1 {}
16+
h2 { font-size: 1.2em; }
17+
#page{
18+
background-color: #FFFFFF;
19+
width: 60%;
20+
margin: 24px auto;
21+
padding: 12px;
22+
}
23+
#header {
24+
padding: 6px ;
25+
text-align: center;
26+
}
27+
.status3xx { background-color: #475076; color: #FFFFFF; }
28+
.status4xx { background-color: #C55042; color: #FFFFFF; }
29+
.status5xx { background-color: #F2E81A; color: #000000; }
30+
#content {
31+
padding: 4px 0 24px 0;
32+
}
33+
#footer {
34+
color: #666666;
35+
background: #f9f9f9;
36+
padding: 10px 20px;
37+
border-top: 5px #efefef solid;
38+
font-size: 0.8em;
39+
text-align: center;
40+
}
41+
#footer a {
42+
color: #999999;
43+
}
44+
--></style>
45+
</head>
46+
<body>
47+
<div id="page">
48+
<div id="header" class="status5xx">
49+
<h1>ERROR 502 - Bad Gateway!</h1>
50+
</div>
51+
<div id="content">
52+
<h2>The following error occurred:</h2>
53+
<p>This server received an invalid response from an upstream server it accessed to fulfill the request.</p>
54+
<P>If you get this message repeatedly please contact the <!--WEBMASTER//-->webmaster<!--WEBMASTER//-->.</p>
55+
</div>
56+
<div id="footer">
57+
<p>Powered by <a href="http://www.ispconfig.org">ISPConfig</a></p>
58+
</div>
59+
</div>
60+
</body>
61+
</html>

server/conf/error/de/502.html

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4+
<head>
5+
<title>FEHLER 502 - Fehlerhaftes Gateway!</title>
6+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7+
<meta name="robots" content="noindex" />
8+
<style type="text/css"><!--
9+
body {
10+
color: #444444;
11+
background-color: #EEEEEE;
12+
font-family: 'Trebuchet MS', sans-serif;
13+
font-size: 80%;
14+
}
15+
h1 {}
16+
h2 { font-size: 1.2em; }
17+
#page{
18+
background-color: #FFFFFF;
19+
width: 60%;
20+
margin: 24px auto;
21+
padding: 12px;
22+
}
23+
#header {
24+
padding: 6px ;
25+
text-align: center;
26+
}
27+
.status3xx { background-color: #475076; color: #FFFFFF; }
28+
.status4xx { background-color: #C55042; color: #FFFFFF; }
29+
.status5xx { background-color: #F2E81A; color: #000000; }
30+
#content {
31+
padding: 4px 0 24px 0;
32+
}
33+
#footer {
34+
color: #666666;
35+
background: #f9f9f9;
36+
padding: 10px 20px;
37+
border-top: 5px #efefef solid;
38+
font-size: 0.8em;
39+
text-align: center;
40+
}
41+
#footer a {
42+
color: #999999;
43+
}
44+
--></style>
45+
</head>
46+
<body>
47+
<div id="page">
48+
<div id="header" class="status5xx">
49+
<h1>FEHLER 502 - Fehlerhaftes Gateway!</h1>
50+
</div>
51+
<div id="content">
52+
<h2>Folgender Fehler ist aufgetreten:</h2>
53+
<p>Dieser Server hat eine ung&uuml;ltige Antwort von einem Upstream-Server erhalten, auf den zugegriffen wurde, um die Anforderung zu erf&uuml;llen. </p>
54+
<P>Sollten Sie diese Fehlermeldung öfter erhalten, wenden Sie sich bitte an den <!--WEBMASTER//-->Webmaster<!--WEBMASTER//-->.</p>
55+
</div>
56+
<div id="footer">
57+
<p>Powered by <a href="http://www.ispconfig.org">ISPConfig</a></p>
58+
</div>
59+
</div>
60+
</body>
61+
</html>

server/conf/error/en/502.html

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4+
<head>
5+
<title>ERROR 502 - Bad Gateway!</title>
6+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7+
<meta name="robots" content="noindex" />
8+
<style type="text/css"><!--
9+
body {
10+
color: #444444;
11+
background-color: #EEEEEE;
12+
font-family: 'Trebuchet MS', sans-serif;
13+
font-size: 80%;
14+
}
15+
h1 {}
16+
h2 { font-size: 1.2em; }
17+
#page{
18+
background-color: #FFFFFF;
19+
width: 60%;
20+
margin: 24px auto;
21+
padding: 12px;
22+
}
23+
#header {
24+
padding: 6px ;
25+
text-align: center;
26+
}
27+
.status3xx { background-color: #475076; color: #FFFFFF; }
28+
.status4xx { background-color: #C55042; color: #FFFFFF; }
29+
.status5xx { background-color: #F2E81A; color: #000000; }
30+
#content {
31+
padding: 4px 0 24px 0;
32+
}
33+
#footer {
34+
color: #666666;
35+
background: #f9f9f9;
36+
padding: 10px 20px;
37+
border-top: 5px #efefef solid;
38+
font-size: 0.8em;
39+
text-align: center;
40+
}
41+
#footer a {
42+
color: #999999;
43+
}
44+
--></style>
45+
</head>
46+
<body>
47+
<div id="page">
48+
<div id="header" class="status5xx">
49+
<h1>ERROR 502 - Bad Gateway!</h1>
50+
</div>
51+
<div id="content">
52+
<h2>The following error occurred:</h2>
53+
<p>This server received an invalid response from an upstream server it accessed to fulfill the request.</p>
54+
<P>If you get this message repeatedly please contact the <!--WEBMASTER//-->webmaster<!--WEBMASTER//-->.</p>
55+
</div>
56+
<div id="footer">
57+
<p>Powered by <a href="http://www.ispconfig.org">ISPConfig</a></p>
58+
</div>
59+
</div>
60+
</body>
61+
</html>

server/conf/error/es/502.html

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4+
<head>
5+
<title>ERROR 502 - Bad Gateway!</title>
6+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7+
<meta name="robots" content="noindex" />
8+
<style type="text/css"><!--
9+
body {
10+
color: #444444;
11+
background-color: #EEEEEE;
12+
font-family: 'Trebuchet MS', sans-serif;
13+
font-size: 80%;
14+
}
15+
h1 {}
16+
h2 { font-size: 1.2em; }
17+
#page{
18+
background-color: #FFFFFF;
19+
width: 60%;
20+
margin: 24px auto;
21+
padding: 12px;
22+
}
23+
#header {
24+
padding: 6px ;
25+
text-align: center;
26+
}
27+
.status3xx { background-color: #475076; color: #FFFFFF; }
28+
.status4xx { background-color: #C55042; color: #FFFFFF; }
29+
.status5xx { background-color: #F2E81A; color: #000000; }
30+
#content {
31+
padding: 4px 0 24px 0;
32+
}
33+
#footer {
34+
color: #666666;
35+
background: #f9f9f9;
36+
padding: 10px 20px;
37+
border-top: 5px #efefef solid;
38+
font-size: 0.8em;
39+
text-align: center;
40+
}
41+
#footer a {
42+
color: #999999;
43+
}
44+
--></style>
45+
</head>
46+
<body>
47+
<div id="page">
48+
<div id="header" class="status5xx">
49+
<h1>ERROR 502 - Bad Gateway!</h1>
50+
</div>
51+
<div id="content">
52+
<h2>The following error occurred:</h2>
53+
<p>This server received an invalid response from an upstream server it accessed to fulfill the request.</p>
54+
<P>If you get this message repeatedly please contact the <!--WEBMASTER//-->webmaster<!--WEBMASTER//-->.</p>
55+
</div>
56+
<div id="footer">
57+
<p>Powered by <a href="http://www.ispconfig.org">ISPConfig</a></p>
58+
</div>
59+
</div>
60+
</body>
61+
</html>

0 commit comments

Comments
 (0)