72 lines
1.3 KiB
Plaintext
Executable File
72 lines
1.3 KiB
Plaintext
Executable File
recursive_error_pages on;
|
|
return 404;
|
|
# 403 Forbidden
|
|
error_page 403 @403;
|
|
location @403 {
|
|
root /srv/http/errors;
|
|
try_files /403.html =500;
|
|
}
|
|
|
|
# 404 Not Found
|
|
error_page 404 @local404;
|
|
location @local404 {
|
|
try_files /404.html /404.md /404.gmi @niver404;
|
|
}
|
|
location @niver404 {
|
|
root /srv/http/errors;
|
|
try_files /404.php =500;
|
|
index 404.php;
|
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
|
fastcgi_pass unix:/var/run/php-fpm/errors.sock;
|
|
include inc/fastcgi.conf;
|
|
}
|
|
|
|
# 405 Method Not Allowed
|
|
error_page 405 @405;
|
|
location @405 {
|
|
root /srv/http/errors;
|
|
try_files /405.html =500;
|
|
}
|
|
|
|
# 410 Gone
|
|
error_page 410 @410;
|
|
location @410 {
|
|
root /srv/http/errors;
|
|
try_files /410.html =500;
|
|
}
|
|
|
|
# 418 I'm a teapot
|
|
error_page 418 @418;
|
|
location @418 {
|
|
root /srv/http/errors;
|
|
try_files /418.html =500;
|
|
}
|
|
|
|
# 500 Internal Server Error
|
|
error_page 500 @500;
|
|
location @500 {
|
|
root /srv/http/errors;
|
|
try_files /500.html =500;
|
|
}
|
|
|
|
# 502 Bad Gateway
|
|
error_page 502 @502;
|
|
location @502 {
|
|
root /srv/http/errors;
|
|
try_files /502.html =500;
|
|
}
|
|
|
|
# 503 Service Unavailable
|
|
error_page 503 @503;
|
|
location @503 {
|
|
root /srv/http/errors;
|
|
try_files /503.html =500;
|
|
}
|
|
|
|
# 504 Gateway Timeout
|
|
error_page 504 @504;
|
|
location @504 {
|
|
root /srv/http/errors;
|
|
try_files /504.html =500;
|
|
}
|