own side of the 404, 403, 500 error

I need my own 404 error page. It was simple in the DA panel, it is enough to create a 404.shtm, 500.shtml l file in the directory, does such a function work in virtualmin? with * shtml I know it doesn’t work :slight_smile:

SYSTEM INFORMATION
OS type and version REQUIRED
Virtualmin version REQUIRED

shtm or shtml is normally used as the file extension for Server-Side Includes. I don’t know why that would be expected to work in the general case. Server-Side Includes are very heavy and not very widely used in modern systems. We do not enable them by default, though you could if you wanted to. But, that’s not related to custom error pages.

There are several ways to add ErrorDocument directives to your Apache configuration in Virtualmin (ErrorDocument is how you specify custom error pages in Apache).

If you want custom errors for every domain, you could put the files into the skel (normally /etc/skel, but configurable) and add the ErrorDocument directives to Server Templates->Website for domain-> Directives and settings for new websites.

If a domain owner user needs to add them, they could be added via .htaccess (if you allow them to override it), or in the UI (again, if you allow them to have it), select a domain, browse to Services->Website Options->Error Handling. Then set it up to point whatever errors you want to a URL (could just be a path like /404.html).

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.