Created
June 7, 2015 01:09
-
-
Save ejangi/bae9a5ba5c5c91a06d94 to your computer and use it in GitHub Desktop.
NGINX Custom Error Pages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http { | |
... | |
server { | |
... | |
error_page 401 @401; | |
location @401 { | |
root /srv/www/error-documents/public; | |
try_files /401.html =401; | |
} | |
error_page 403 @403; | |
location @403 { | |
root /srv/www/error-documents/public; | |
try_files /403.html =403; | |
} | |
error_page 404 @404; | |
location @404 { | |
root /srv/www/error-documents/public; | |
try_files /404.html =404; | |
} | |
error_page 408 @408; | |
location @408 { | |
root /srv/www/error-documents/public; | |
try_files /408.html =408; | |
} | |
error_page 500 @500; | |
location @500 { | |
root /srv/www/error-documents/public; | |
try_files /500.html =500; | |
} | |
error_page 502 @502; | |
location @502 { | |
root /srv/www/error-documents/public; | |
try_files /502.html =502; | |
} | |
error_page 503 @503; | |
location @503 { | |
root /srv/www/error-documents/public; | |
try_files /503.html =503; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment