Mobile app version of vmapp.org
Login or Join
Gonzalez347

: Custom Page for Suspended Website - Plesk I have suspended a website on Plesk and i want to show users a custom page. Do you guys know how to do it?

@Gonzalez347

Posted in: #Plesk

I have suspended a website on Plesk and i want to show users a custom page. Do you guys know how to do it?

10.03% popularity Vote Up Vote Down


Login to follow query

More posts by @Gonzalez347

3 Comments

Sorted by latest first Latest Oldest Best

 

@Gail5422790

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.

Try this:

Create a new file /etc/httpd/conf.d/customerrors.conf

Add the following contents to the file:

Alias /error/ "/var/www/error/"

ErrorDocument 400 /error/HTTP_BAD_REQUEST.html
ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html
ErrorDocument 403 /error/HTTP_FORBIDDEN.html
ErrorDocument 404 /error/HTTP_NOT_FOUND.html
ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html
ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html
ErrorDocument 410 /error/HTTP_GONE.html
ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html
ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html
ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html
ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html
ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html
ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html
ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html
ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html
ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html
ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html


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.

10% popularity Vote Up Vote Down


 

@Tiffany637

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.

10% popularity Vote Up Vote Down


 

@Goswami781

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.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme