Created
August 8, 2017 03:06
-
-
Save hotta/b23e9ba71d3d36b7e73e943e1ab995e7 to your computer and use it in GitHub Desktop.
always return http status 503 with custom error page using nginx.
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
<!-- /var/www/http503/custom_503.html --> | |
<html> | |
<body> | |
<h1>custom_503.html</h1> | |
<img src='images/job_it_dokata.png' alt='IT Dokata'> | |
</body> | |
</html> |
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
# /etc/nginx/conf.d/http503.conf | |
server { | |
listen 80; | |
server_name http503.example.com; | |
error_page 404 =503 /custom_503.html; | |
error_page 403 =503 /custom_503.html; | |
root /var/www/http503; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment