Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

How to use php file as an errorpage?

$
0
0
I currently have custom html as an errorpage, but would like to use php.

Errorpages are configured in /etc/nginx/sites-enabled/mysite.com.conf

Apparently just changing
error_page 50x = /errorfiles/error50x.html;
to
error_page 50x = /errorfiles/error50x.php;
doesn't work.

What should I do to make my php errorpage work?

The reason I want to do this is that I want to send an email to myself when error 50x happens. Flooding my emailbox is not an issue here.

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>