I'm trying to trigger an nginx error to test my error pages. This is what I tried:
server {
// ...
root /path/to/site
error_page 504 502 500 = /html/error/500.html; # absolute path: /path/to/site/html/error/500.html
return 500;
}
But I keep getting the default nginx error. Testing the html is not enough, I wanna make sure that nginx will show the correct error pages.
Any ideas?
server {
root /path/to/site
error_page 504 502 500 = /html/error/500.html;
location /get_error {
return 500;
}
}
See the docs: http://nginx.org/en/docs/http/ngx_http_rewrite_module.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With