Applicable to:
- Plesk Obsidian for Linux
Question
How to configure custom error pages for all domains on the server?
Answer
-
Download linux_default_skeleton.zip from the How to change the default content for newly created domains in Plesk? article.
Unpack it and modify the content oferror_docs
directory in a desired way. -
Compress it back into a
.zip
archive. Please note that.zip
archive should contain all the files and directories in its root (cgi-bin
,error_docs
,httpdocs
and so on). -
Upload this modified archive in Tools & Settings > Virtual Host Template menu, by selecting a file and pressing Send file button.
-
Enable Custom error documents option for domains/subscriptions using one of the following ways:
-
For multiple subscriptions on a specific service plan: Enable option Custom error documents option in Service Plans > Example-plan-name > Hosting Parameters and then synchronize plan with subscriptions.
-
For all domains at once via CLI:
-
Connect to the server via SSH
-
Run the following command:
# for i in
plesk bin domain --list
; do plesk bin domain -u $i -err_docs true; done
Note: Some websites/applications might use their own custom error pages (by means of rewrite rules), so the changes might not be reflected on some domains.
Comments
0 comments
Please sign in to leave a comment.