Tag-Archive for » cpanel «

Saturday, November 01st, 2008 | Author: Angelo

Installation of apache module mod_limitipconn on cPanel server (apache version 2.X)

mod_limitipconn is used for limiting number of connections from each ip to particular site by enabling it in virtualhost of particular site. Suppose site name is mysitename.com and it’s cPanel username mysite.

Installation :: installing module mod_limitipconn

Download mod_limitipconn & untar the file. After downloading compile mod_limitipconn with apache using following command.

/usr/local/apache/bin/apxs -cia mod_limitipconn.c

Once you finish with installation of module mod_limitipconn

Uncomment following line in virtual host of site mysitename.com in /etc/httpd/conf/httpd.conf

Include "/usr/local/apache/conf/userdata/std/1/mysite/mysitename.com/*.conf"

Now fire following command to create directory mysitename.com with it’s parent directory mysite.

mkdir -p /usr/local/apache/conf/userdata/std/1/mysite/mysite.com
cd /usr/local/apache/conf/userdata/std/1/mysite/mysite.com

Then, touch a file called ipconn.conf and in it add following line. So that site will have max 3 connections from each ip.

<Location />
MaxConnPerIP 3
# exempting images from the connection limit is often a good
# idea if your web page has lots of inline images, since these
# pages often generate a flurry of concurrent image requests
NoIPLimit image/*
</Location>

Now restart apache service.

We can directly add above lines in virtualhost of domain mysitenaem.com. But when easyapache will be done in the server, the above changes will be overwritten. To avoid this we recommend above this method.

Now run following cPanel script and restart apache service.
/scripts/ensure_vhost_includes –user=mysite

Saturday, October 25th, 2008 | Author: Angelo

ERROR: Connection dropped by IMAP server.

Common error while accessing email account via squirrel mail client on cPanel server. This error occurs due to wrong ownership of file or folder located under etc or mail directory. Here is what worked for me on cPanel server. Suppose cPanel username is xyz to fix the issue execute following commands on server.

[root@server ]#cd /home/xyz
[root@server ]#chown xyz.xyz mail -R
[root@server ]#chown xyz.mail etc -R

Wednesday, October 22nd, 2008 | Author: Angelo

phpMyAdmin - Error

#2002 - The server is not responding (or the local MySQL server’s socket is not correctly configured)

Here is what worked for me on cPanel server.

root@server [~]# vi /usr/local/cpanel/base/3rdparty/phpMyAdmin/config.inc.php

find
$cfg['Servers'][$i]['socket'] = ”;
change to
$cfg['Servers'][$i]['socket'] = ‘/var/lib/mysql/mysql.sock‘;

next line
$cfg['Servers'][$i]['connect_type'] = ‘tcp‘;
change to
$cfg['Servers'][$i]['connect_type'] = ‘socket‘;

now restart mysql service

root@server [~]# /etc/init.d/mysql restart

Monday, October 13th, 2008 | Author: Angelo

Internal server error
Could not fetch uid or gid for : cpanel-phpmyadmin

Verify user cpanel-phpmyadmin exists by command
[root@server ~]#grep cpanel-phpmyadmin /etc/passwd

If it doesn’t exist then add user cpanel-phpmyadmin
useradd cpanel-phpmyadmin -d /var/cpanel/userhomes/cpanel-phpmyadmin

Now, assign appropiate ownership to /var/cpanel/userhomes/cpanel-phpmyadmin
chown cpanel-phpmyadmin.cpanel-phpmyadmin /var/cpanel/userhomes/cpanel-phpmyadmin -R

Restart mysql and try once again to access phpmyadmin.

Monday, October 13th, 2008 | Author: Angelo

Child pid x exit signal File size limit exceeded:

The error is cause of File size limit. With 32 Bit system apache support max filesize upto 2GB. If any file accessed/required by apache exceeds this limit, you will get above error. You can check for the file under “/usr/local/apache/domlogs“. To sort all files under this directory by size use command ls -lSh | more. Once you get the file with size 2 GB simply recreate and assign appropriate ownership to the same.