• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Question How to have more (numerous and) detailed Custom Error pages in Plesk ?

Alex Laforge

New Pleskian
Hi,

In plesk 12.5, there are only 14 default customizable Error pages.
I know how to customize them in the "Default Host Template" (usually located in C:\Inetpub\vhosts\.skel\0\httpdocs)

But I have noticed that Microsoft did a "better" job by providing more detailed error custom pages, relating to each error code (using "subStatusCode"), located in :
  • C:\inetpub\custerr\en-US
  • C:\inetpub\custerr\fr-FR
They provide 56 custom error pages (for example 500.htm, 500-13.htm, 500-14.htm, 500-19.htm, 500-100.htm, and so on).
It would be great if there were a way to use these custom detailed error pages when Plesk generates a new website from this template.

I can create these files into the "Default Host Template" folder, and thy will be copied with every new website. BUT : Plesk only creates 14 rules for its default 14 files in the "web.config" file, always with subStatusCode set to "-1".

How can I have Plesk to generate more rules in the "web.config" file with the detailed subStatusCode, without having to painfully adding my additional files rules , and without having to edit each file for the @domain_name@ placeholder that will obviously remain blank ?
 
Last edited:
I would suggest you submit corresponding feature request here https://plesk.uservoice.com/
Hi Igor, that's done !

Heye is the feature suggestion : Please vote if you find it useful. I think it actually IS ! :)

https://plesk.uservoice.com/forums/184549-feature-suggestions/suggestions/18324991-have-more-detailed-custom-error-pages-including-ht

Actually, I am writing a custom VbScript task that is launched by the Plesk "Event Manager" on every "Domain created" event.

My custom VBScript task consists in determining the proper /error_docs/ folder (in the case of this domain is a subdomain created under the "main domain" folder), and replaces the @domain_name@ placeholder inside all my 56 customized error pages coming fro the "Virtual Host Template" located under /.skel/0.

Then, it creates the appropriate rules inside the "web.config" file, by dropping the Plesk-generated ones, and adding mines, in the following section "<configuration><system.webServer><httpErrors>". Plesk could greatly automate this process, so please vote for this suggestion here !
 
Hi, So : My VBScript to customize the error pages works well when I launch it from the command-line manually, under the "Administrator" account.

But when this task is launched by a Plesk "Event Handler" under "Plesk Administrator" user (psaadm), it fails.

Examining the "Security" permission on the c:/inetpub/vhosts folder, it seems that "psaadm" does not have any permissions to the newly created websites (example.com).
I have tried to "Enable Permissions Inheritance" on the c:/inetpub/vhosts folder, but the result is the same : Every new domain does not have any permissions set for "psaadm".

I'm stuck, and having to launch my custom Script file manually makes the Plesk Event Manager useless...

- So how can these new domains folders have permissions for the "psaadm" user ? The Event Manager becomes useless ... :-(
- Or how can these Plesk Event Handler be run under a more powerful user (Administrator" for example) ?

Any help would be greatly (really!) appreciated ;) Thank you ..
 
Back
Top