Just one 500.shtml for all users

tincboy

Verified User
Joined
Aug 14, 2009
Messages
126
I want to prevent accounts in DirectAdmin to change their 500.shtml and instead I want just one file to be viewed on all websites on my server when getting error 500 on them,
So is there any way to achieve this goal?
 
Not really cause it can always be overwritten with htaccess directives.
 
I don't care if someone change it via htaccess, just for normal users I want to server my own custom page which will be changed periodically and I don't want to be accessible in user's public_html
 
Hello,

1. Create pages and put them let's say into /var/www/errors/ or even into /home/admin/errors/
2. Create aliases in apache configs (make sure you protect your modifications against being overwritten), for example:

Code:
Alias /401.shtml "/var/www/errors/401.shtml"
Alias /403.shtml "/var/www/errors/403.shtml"
Alias /404.shtml "/var/www/errors/404.shtml"
Alias /405.shtml "/var/www/errors/405.shtml"
Alias /500.shtml "/var/www/errors/500.shtml"
Alias /502.shtml "/var/www/errors/502.shtml"
Alias /503.shtml "/var/www/errors/503.shtml"
Alias /504.shtml "/var/www/errors/504.shtml"
 
I want to run a PHP script every time error 500 occurs, but as I'm using php5_cgi changing the Alias to a PHP will also throw an error 500
any one has any suggestion about how to make it possible?
 
I've done this job by putting the php file in /var/www/html/roundcube and change it's owner to webapp, It's OK now.
 
other places than round cube will cause error 500 because of permissions
 
You did not specify what you are trying to do and what you did and what you tried. Without it I can't help you here, so you should either give us details or hire somebody to fix it for you. One thing I'd say, you must be doing something wrong (I don't know what exactly yet) if you can not set your own error pages.
 
Back
Top