File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -6144,7 +6144,7 @@ For support GeoIP2 we have [ngx_http_geoip2_module](https://github.com/leev/ngx_
6144
6144
6145
6145
Example 1:
6146
6146
6147
- 1. Create error page template in ` /var/www/error_pages/error .html` :
6147
+ 1. Create error page template in ` /var/www/error_pages/errors .html` :
6148
6148
6149
6149
` ` ` html
6150
6150
< ! -- Based on: https://blog.adriaan.io/one-nginx-error-page-to-rule-them-all.html -->
@@ -6169,6 +6169,19 @@ Example 1:
6169
6169
< /html>
6170
6170
` ` `
6171
6171
6172
+ or
6173
+
6174
+ ` ` ` html
6175
+ < html>
6176
+ < head>
6177
+ < title><! --# echo var=" status" default=" " --> < ! --# echo var=" status_text" default=" Something goes wrong..." --></title>
6178
+ < /head>
6179
+ < body>
6180
+ < center><h1><! --# echo var=" status" default=" " --> < ! --# echo var=" status_text" default=" Something goes wrong..." --></h1></center>
6181
+ < /body>
6182
+ < /html>
6183
+ ` ` `
6184
+
6172
6185
2. Define error codes map in the http context or include it from a file:
6173
6186
6174
6187
` ` ` nginx
@@ -6226,9 +6239,9 @@ server {
6226
6239
6227
6240
...
6228
6241
6229
- error_page 400 401 403 404 405 500 501 502 503 /error .html;
6242
+ error_page 400 401 403 404 405 500 501 502 503 /errors .html;
6230
6243
6231
- location = /error .html {
6244
+ location = /errors .html {
6232
6245
6233
6246
ssi on;
6234
6247
internal;
You can’t perform that action at this time.
0 commit comments