I am new to nGinx and I need some help redirecting all errors to a default page.
EG: I want all 500 Internal Server errors and 404 Not Found errors to be redirected to http://www.mydomain.com/error.php
I currrently added this into my nginx.conf file:
http {
server {
error_page 404 http://www.mywebsite.com/error.php;
error_page 500 http://www.mywebsite.com/error.php;
}
................
................
}
But nothing happens after I restart nGinx.
When I visit a page that doesn't exist, I still get the default error page from nGinx.