2016-11-08

Please note that in order to complete these steps you must have admin access to Plesk.

While you would think that enabling “Custom Error Docs” under hosting settings in Plesk, then editing the appropriate document under the /error_docs/ folder in your vhost root would do the trick, unfortunately that’s not the case. Those error documents are seemingly only capable of being loaded by Apache.

If you’ve specified IP allows/denies using Plesk 12+ then it’s using nginx to handle those denies. This is great for performance and resource consumption, but not great when it comes to compatibility with features initially configured for apache use, like custom error documents.

I tried placing the standard error_page directive at every level of the vhost’s nginx config and it did not work anywhere.

The only solution I found that worked was to redirect to an external URL:

If you don’t have another domain to use, the simplest fix is to create a subdomain to enter there, like errors.mydomain.com. Once you have your error doc in the right place (the secondary domain’s web root in the case of the path above), simply insert the abovec code in the domain’s “Additional nginx directives” box (under Apache & Nginx settings). That box is provided only to Plesk admins.

Show more