After reading some tutorials, I have created an error file, that should be displayed instead of 500 server error. I have added it to domain's root and added the following line to the bottom of .htaccess:
ErrorDocument 500 /error.html
Now the question is, how can I test it on a live site and make sure that the error page appears, when site really crashes?
Any suggestions are much appreciated.
Best Answer
I created a folder called
http500
in the www rootI put a
.htaccess
file into that folder with the following:I then opened it http://example.com/http500
You can try out different error pages
or
or
It did not require any server restart, the change applied immediately.
Sources:
https://stackoverflow.com/a/8687536/534883
https://bibwild.wordpress.com/2013/06/05/how-to-make-apache-fake-a-500-http-response/