I have suspended a website on Plesk and i want to show users a custom page. Do you guys know how to do it?
There are a couple of ways to do this:
One way is to unsuspend it and then move all the site files into a subdirectory. That means that every page will return a 404 error. You then edit your custom error page for that error to show the users the custom page.
Or you can put it in maintenance mode and edit your 503 custom error page.
Yeah, you have to unsuspend the site and set the main page from the list of the error pages which should be located in your main site directory.
The question seems to be asking more for how to set a server-wide custom error message rather that how to customize the error messages for just one site at a time.
Create a new file
Add the following contents to the file:
You can just add the 503 document if you are only interested in customizing the "service unavailable" message that come up when you suspend a site, but if you want to customize all default server error messages, might as well do it all at once with the above.
There are more complex ways to do it that include international language support and default headers and footer, etc, but I'm just sticking with a flat HTML file for each error for now.
Now if you want to override the error messages for an individual site you can edit that site's .htaccess file with the same ErrorDocument section from above but point it to different files just for that one site.