Apache Status (whm-server-status) in cPanel WebHost Manager Returns Blank Page

0

Posted by admin | Posted in Dedicated Server Tutorials | Posted on 19-06-2009

When webmaster uses WebHost Manager (WHM) to manage a cPanel-based web hosting package, he or she may encounters the problem that the Apache Status under the section of Server Status returns black page or blank screen with just the default cPanel WHM control center header. In Apache error log (error_log file normally located in /etc/httpd/logs or /usr/local/apache/logs directory), the “[error] [client 127.0.0.1] File does not exist: /usr/local/apache/htdocs/whm-server-status” error message will be found. The reason and cause of this error is due to misconfiguration of Apache HTTPD web server configuration file.

On a new cPanel web host, the Apache configuration file (httpd.conf) will be configured to set location of /whm-server-status to be handled by server-status feature of Apache. If this few lines of code is removed, Apache no longer know what to do when WHM trying to access /whm-server-status, just like when you remove or delete an alias or virtual host configuration, the alias or vhost no longer be accessible.

To solve the error, simply add the following lines to httpd.conf file, normally located in /etc/httpd/conf or /usr/local/apache/logs. These lines are by default added before the virtual hosts declaration.


SetHandler server-status
Order deny,allow
Deny from all
Allow from 127.0.0.1

ExtendedStatus On

The last line, ExtendedStatus On tells Apache tol generate “full” status information instead of just basic information when the “server-status” handler is called.

cPanel WHM Failed to Receive Status Information From Apache Error

0

Posted by admin | Posted in Dedicated Server Tutorials | Posted on 19-06-2009

cPanel web hosting control panel provides easy access shortcut in WHM (WebHost Manager) to check server status. One of the server status components is Apache Status which calls apachestatus script to display important information about Apache HTTPD web server, such as server version, built, uptime, restart time, total accesses, CPU usage, amount of requests and etc. However, you may encounter the following error message when you click on “Apache Status” link:

Failed to receive status information from Apache.

Administrators may also get the following error line in Apache error log: [error] [client 127.0.0.1] File does not exist: /usr/local/apache/htdocs/whm-server-status.

The error message only appears on cPanel 11, whereas in earlier version of cPanel, a blank page is returned.

The cause of this error is due to missing location declaration in configuration file for /whm-server-status which is required by apachestatus script to retrieve status and information of Apache web server. whm-server-status location defines how should Apache handles the access request to the path. The lines may get deleted or removed if there is a mistake during Apache compilation process, especially when using Apache Update under Software in WHM.

To resolve the problem, simply add back the location declaration lines of whm-server-status to the httpd.conf file, normally located in /etc/httpd/conf/ or /usr/local/apache/logs. These lines can be added anywhere in the configuration file (but not within VirtualHosts declaration. Ideally, it should be placed before the virtual hosts declaration section.


SetHandler server-status
Order deny,allow
Deny from all
Allow from 127.0.0.1

ExtendedStatus On

The last line, “ExtendedStatus On” tells Apache tol generate full detailed status information instead of just basic information when the “server-status” handler is called “whm-server-status”.

cPanel Invalid License File After Changing Hostname Error

0

Posted by admin | Posted in Dedicated Server Tutorials | Posted on 19-06-2009

After changing web host server hostname by using WHM (WebHost Manager) or via shell command, cPanel may display “Invalid License File” error message. The symptom appears immediately on next navigation, and even after administrator or cPanel user logout and login again to WHM/cPanel. The error occurs because changing hostname will invalidate the cPanel license.

The solution to invalid cPanel license is easy. Simply login to the server via SSH as root (or su to root), and run the following command:

/usr/local/cpanel/cpkeyclt

The command will reset and refresh update the cPanel license file with the new current hostname, and push the change to cPanel’s license verification servers auth.cpanel.net and verify.cpanel.net.