Nice error pages(4xx and 5xx) for Nginx
-
Navigate into Nginx's default document directory:
cd /usr/share/nginx/html
-
Clone the repository or download the files directly:
git clone https://github.com/luisxiaomai/nginx-error-pages.git
-
Include the the custom error pages to the server's website configuration file:
server { ... include /usr/share/nginx/html/nginx-errors/nginx-errors-temp1.conf }
or
server { ... include /usr/share/nginx/html/nginx-errors/nginx-errors-temp2.conf }
-
Reload Nginx Server:
nginx -s reload