HTML Template HTTP Codes is a HTML templates to decorate your HTTP web server responses/errors
Change default nginx/apache templates for a responsive and more attractive design
View all my projects »
Report Bug
·
View License
·
Request Feature
Just clone/download the git repository (The html files are included on error number folder, example "500/index.html" for 500 Internal Server Error)
NGINX supports custom error-pages using multiple error_page
directives.
File: nginx.conf
(/etc/nginx/)
Example - assumes HttpErrorPages are located into /var/html/www/ErrorPages
.
server {
listen 80;
server_name localhost;
root /var/html/www;
index index.html;
location / {
try_files $uri $uri/ =404;
# add one directive for each http status code
error_page 404 /ErrorPages/404/index.html;
error_page 500 /ErrorPages/500/index.html;
error_page 503 /ErrorPages/503/index.html;
error_page 503 /ErrorPages/504/index.html;
}
# redirect the virtual ErrorPages path the real path
location /ErrorPages/ {
alias /var/html/www/ErrorPages/;
internal;
}
Apache Httpd 2.x supports custom error-pages using multiple ErrorDocument directives.
File: httpd.conf
or .htaccess
Example - assumes HttpErrorPages are located into your document root /var/www/...docroot../ErrorPages
.
ErrorDocument 404 /ErrorPages/404/index.html
ErrorDocument 500 /ErrorPages/500/index.html
ErrorDocument 503 /ErrorPages/503/index.html
ErrorDocument 504 /ErrorPages/504/index.html
You can check out the full license here
This project is licensed under the terms of the MIT license.