/cpanel, /webmail, /whm etc. missing

wswd

Well-Known Member
Aug 9, 2005
142
16
168
cPanel Access Level
Root Administrator
Hi guys,

These have apparently disappeared from our server and will no longer work. They yield a 404 error.

About the same time this happened (possibly related, possibly not?), custom error pages no longer work anywhere on the server.


Any idea on what the problem might be?

Thank you in advance.
 

freedog96150

Well-Known Member
Mar 25, 2005
68
0
156
Nevada, USA
Sounds like the /etc/httpd/conf/httpd.conf file was changed and the appropriate lines deleted or commented out. Look in the conf directory and see if there are any backup versions of the httpd.conf file. Compare lines starting with "ScriptAlias" between your backup file and the actual httpd.conf file. You should see one ScriptAlias line for each of the above - /cpanel, /webmail, etc.

You can also look in the /var/local/cpanel/APACHE_CONFIG file to see what may have been added or removed by cPanel.

Since you did not mention which version WHM and cPanel you are on, the above are just guesses. Hopefully this give you a good starting point.
 

freedog96150

Well-Known Member
Mar 25, 2005
68
0
156
Nevada, USA
Sounds like the /etc/httpd/conf/httpd.conf file was changed and the appropriate lines deleted or commented out. Look in the conf directory and see if there are any backup versions of the httpd.conf file. Compare lines starting with "ScriptAlias" between your backup file and the actual httpd.conf file. You should see one ScriptAlias line for each of the above - /cpanel, /webmail, etc.

You can also look in the /var/local/cpanel/APACHE_CONFIG file to see what may have been added or removed by cPanel.

Since you did not mention which version WHM and cPanel you are on, the above are just guesses. Hopefully this give you a good starting point.
 

wswd

Well-Known Member
Aug 9, 2005
142
16
168
cPanel Access Level
Root Administrator
Thanks Freedog for the start. We're running WHM 10.8.0 cPanel 10.9.0-R57

I have 12 backups of the httpd.conf and all are the same.

The only thing I have listed in the ScriptAlias section is:

ScriptAlias /cgi-bin/ "/usr/local/apache/cgi-bin/"
 

kistler

Well-Known Member
Jan 27, 2005
136
1
166
here is what you need.

Code:
ScriptAlias /cgi-sys/ /usr/local/cpanel/cgi-sys/
Alias /whm /usr/local/cacti
Alias /sys_cpanel/ /usr/local/cpanel/sys_cpanel/
Alias /java-sys/ /usr/local/cpanel/java-sys/
Alias /img-sys/ /usr/local/cpanel/img-sys/
Alias /akopia/ /usr/local/cpanel/3rdparty/interchange/share/akopia/
Alias /neo-images/ /usr/local/cpanel/base/neomail/neo-images/
ScriptAliasMatch ^/cpanel/(.*) /usr/local/cpanel/cgi-sys/redirect.cgi
ScriptAlias /cpanel /usr/local/cpanel/cgi-sys/redirect.cgi
ScriptAlias /whm /usr/local/cpanel/cgi-sys/whmredirect.cgi
ScriptAlias /securewhm /usr/local/cpanel/cgi-sys/swhmredirect.cgi
ScriptAlias /webmail /usr/local/cpanel/cgi-sys/wredirect.cgi
ScriptAliasMatch ^/webmail/(.*) /usr/local/cpanel/cgi-sys/wredirect.cgi
ScriptAliasMatch ^/kpanel/(.*) /usr/local/cpanel/cgi-sys/redirect.cgi
ScriptAlias /controlpanel /usr/local/cpanel/cgi-sys/redirect.cgi
ScriptAlias /securecontrolpanel /usr/local/cpanel/cgi-sys/sredirect.cgi
Alias /mailman/archives/ /usr/local/cpanel/3rdparty/mailman/archives/public/
ScriptAlias /mailman/ /usr/local/cpanel/3rdparty/mailman/cgi-bin/
Alias /pipermail/ /usr/local/cpanel/3rdparty/mailman/archives/public/
Alias /interchange/ /usr/local/cpanel/3rdparty/interchange/share/interchange/
Alias /interchange-5/ /usr/local/cpanel/3rdparty/interchange/share/interchange-5/
 

wswd

Well-Known Member
Aug 9, 2005
142
16
168
cPanel Access Level
Root Administrator
Thanks Kistler!

Worked like a charm. Appreciate the help!

Anyone have any ideas on the Error Documents not working? Seem to have happened at the exact same time.



[EDIT] Here is some more info:

In IE, the standard error comes, i.e. the normal 404 error page, etc. In Firefox, we get the following:

Not Found
The requested URL /blah.html was not found on this server.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.



There is nothing in the logs remotely related to an internal server area. The only thing showing up in the logs is that the file could not be found. Argh...this is perplexing...
 
Last edited:

wswd

Well-Known Member
Aug 9, 2005
142
16
168
cPanel Access Level
Root Administrator
Just to update, and I've only tried this on a few of our domains:

It looks like I can go in and edit the .htaccess files manually to reflect the error pages. The error page tool doesn't work in cpanel (apparently), and the error files that were set up server-wide seem to be broken, and not even listed in the .htaccess files. Oy!
 

freedog96150

Well-Known Member
Mar 25, 2005
68
0
156
Nevada, USA
The following lines control the system-wide error documents. Most error documents do NOT seem to get created on a standard cPanel install. You can go in a modify these files yourself. I have left my error pages to the Apache system defaults. I know they are ugly and uninformative, but I wanted to encourage each customer to establish their own custom error docs using their own emails and web addresses.

Here is what to look for in the httpd.conf document:
Code:
ErrorDocument 400 /400.shtml
ErrorDocument 401 /path/to/401.shtml
ErrorDocument 403 /path/to/403.shtml
ErrorDocument 404 /path/to/404.shtml
ErrorDocument 500 /path/to/500.shtml
 

wswd

Well-Known Member
Aug 9, 2005
142
16
168
cPanel Access Level
Root Administrator
Hi again Freedog, and thanks for the info.

I know where the default ones are located in the httpd.conf file. What happened on our server though is that the ones the individual users created were all deleted...server-wide, in their .htaccess files. As well, if the users go back and try to make them using the Error Document interface in cPanel, it doesn't work. The only thing that works is editing the .htaccess files manually to add the error documents again.

Weird.