Archive for the Cpanel Category

Can’t login to mail account

Posted on September 12, 2009 with No Comments

On a Cpanel server, a client can’t login to his web mail.

I tried to reset his email account password from cpanel. Still web mail do not allow him to login.

This error is fixed by running /scripts/fixpop

[root@server56]# /scripts/fixpop
Please enter the pop account to add (ex. bob@sally.com)? user-name@client-domain.com
Please enter a password for this pop account? ZudcjgLBNQvI
user-name+client-domain.comCreated user-name@client-domain.com with password ZudcjgLBNQvI for user honcom
[root@server56]#

Internal server error on cpanel server

Posted on June 4, 2009 with No Comments

Today a cpanel server start showing Internal Server error when accessing the sites. This happened for all sites.

This usually cause if log files is too big. So i cleaned all large files in apache log folder

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

Cpanel should do the log rotation if we set at

Main >> Service Configuration >> cPanel Log Rotation Configuration

It look like it do not rotate all log files, in WHM, list of files to rotate, there is no suexec_log

So to remove log files, i created a shell script

vi /root/clean_log.sh

With following content

root@server82 [~]# cat clean_log.sh
#!/bin/bash
 
echo > /usr/local/apache/logs/suphp_log
echo >  /usr/local/apache/logs/error_log
echo > /usr/local/apache/logs/access_log
echo > /usr/local/apache/logs/suexec_log
 
root@server82 [~]#

Make the script executable with

chmod 755 /root/clean_log.sh

Now i set a Cronjob

57 8 * * * /root/clean_log.sh

You need to verify the script works by running the script on command line

cd /usr/local/apache/logs
ls -l
/root/clean_log.sh
ls -l

You will see size of log files got resetted.