cpanel server all sites getting 500 internal server error

From WebHostingNeeds.com
Jump to: navigation, search

Cpanel server all sites stop working, sites shows 500 internal server error.

On checking log file, tere is not much useful info

[email protected] []# tail /usr/local/apache/logs/error_log
[Sun Apr 05 16:12:34 2009] [notice] cannot use a full URL in a 401 ErrorDocument directive --- ignoring!
[Sun Apr 05 16:12:34 2009] [error] [client 77.30.25.110] Premature end of script headers: index.php
[Sun Apr 05 16:12:34 2009] [notice] cannot use a full URL in a 401 ErrorDocument directive --- ignoring!
[Sun Apr 05 16:12:34 2009] [error] [client 72.138.140.233] Premature end of script headers: index.php, referer: http://www.google.ca/search?hl=en&q=ridmaya&meta=&aq=f&oq=
[Sun Apr 05 16:12:34 2009] [notice] cannot use a full URL in a 401 ErrorDocument directive --- ignoring!
[Sun Apr 05 16:12:34 2009] [error] [client 212.118.140.236] Premature end of script headers: index.php
[Sun Apr 05 16:12:34 2009] [notice] cannot use a full URL in a 401 ErrorDocument directive --- ignoring!
[Sun Apr 05 16:12:34 2009] [error] [client 72.138.140.233] Premature end of script headers: index.php, referer: http://www.google.ca/search?hl=en&q=ridmaya&meta=&aq=f&oq=
[Sun Apr 05 16:12:34 2009] [error] [client 65.55.110.69] Premature end of script headers: index.php, referer: http://search.live.com/results.aspx?q=amerilao
[Sun Apr 05 16:12:34 2009] [error] [client 65.55.110.69] Premature end of script headers: index.php, referer: http://search.live.com/results.aspx?q=amerilao
[email protected] []# 

A reboot do not fix the problem.

On checking the log files in folder "/usr/local/apache/logs/" we found the file size are 6 GB, 2 GB etc...

We emptied the files

cd /usr/local/apache/logs
echo > access_log
echo > error_log
echo > suexec_log
echo > suphp_log

Now restarted apache and sites started working.

Problem was caused due to cpanel log roration is not enabled on the server.

To enable cpanel log rotation, login to WHM

Go to

Main >> Service Configuration >> cPanel Log Rotation Configuration

File:cpanel log rotation.jpg

http://blog.hostonnet.com/internal-server-error-on-cpanel-server