Documentation Home> Archive/AllFAQ>DeveloperResourcesWebHome? EditAttach

WHM FAQ

How do I block an IP address from my server?

If you want to block access to your server for whatever reason, you will need to log into the shell as root. Your server should either have ipchains or iptables to help accomplish this. In this example, the attacking IP is 192.168.56.210.

Issue the appropriate command in a terminal session:

  • If you are using ipchains: ipchains -A input -j DENY -p all -l -s 192.168.56.210/32
  • If you are using iptables: iptables -A INPUT -s 192.168.56.210/32 -j DROP

If you just want to block access to one port from an IP :

  • iptables -A INPUT -s 192.168.56.210/32 -p tcp --destination-port 23 -j DROP

The above would drop all packets from 192.168.56.210/32 to port 23 (Telnet) on the server.

There are many in-depth tutorials available on the Internet. Consult your favorite search engine for more information.

How do I clear a full partition?

There are a few possible solutions.

Usually, /var is what fills up first. This is because /var holds all the system logs.

To see what directory or log is taking up all the room, start at the base. Issue the following commands from a terminal session:

  1. cd /var
  2. du -sh *

This will show how much space is used and available in each directory, as well as the file sizes of each file in the current directory. Examine the command's output. Once you see what directory is taking up all the space, cd to it and type the same command again. Follow this searching pattern until you find the files taking up the space.

Once found, you can either delete the files or, if you'd like to save some of the most recent entries to it, you can type this:

  1. tail -5000 filename > filename.new
  2. mv filename.new filename
  3. sync

This will copy the last 5000 lines from the file to a temporary file. Now you probably want to restart whatever service it is that created the file, to release its file lock.

The /usr directory also fills up sometimes, because of Apache. The first thing you should look at is usually the Apache logs.

  1. cd /usr/local/apache
  2. du -sh *

You will likely find that the logs/error_log or logs/access_log files are very large. At this point, you are free to delete them or use the tail trick above.

How do I restart a daemon ?

Most of the services can be restarted from WHM; however, you may need to restart them from the shell. You must be logged in as root to do this. All standard Linux services, such as HTTP, FTP, exim, cPanel/WHM, Interchange, MySQL, etc, have init scripts in /etc/rc.d/init.d/

root@host [~]# ls /etc/rc.d/init.d/
./ atd* exim* httpd.tmpeditlib kdcrotate* named* nscd* rawdevices* snmpd* yppasswdd*
../ autofs* filelimits* identd* keytable* netfs* portmap* rstatd* sshd* ypserv* 
anacron* bandmin* functions* ipaliases* killall* network* portsentry* rusersd* syslog* ypxfrd*
antirelayd* chkservd* gpm* ipchains* kudzu* nfs* proftpd* rwalld* xfs* 
apmd* cpanel3* halt* iptables* lpd* nfslock* radvd* rwhod* xinetd* 
arpwatch* crond* httpd@ isdn* mysql* nofsck* random* single* ypbind*

This is typical of what you will find in this directory. The main ones you should be concerned with are:

  • cpanel3 — starts/stops cPanel and WHM. This includes Interchange, cppop, and cluster management services as well.
  • exim — starts/stops the exim mail server.
  • httpd — starts/stops the Apache web server.
  • mysql — starts/stops the MySQL database server.
  • named — Starts/stops the BIND DNS server.
  • proftpd — Starts/stop the ProFTPd or Pure-FTPd (depending on which is enabled) FTP server.

Using these scripts is very easy. Let's say that named/BIND is down and we need to restart it. As root, type:

  • /etc/rc.d/init.d/named start

You should see it start up, with a green [OK] message on the left side of the shell/terminal window.

If you see a red [FAILED] message, check the message log.

  • tail /var/log/messages

You should be able to see the error. If you cannot fix it yourself, contact tech support. Some of these services have more options than just "start" and "stop," and other ways to do them.

Let's say you have a lot of domains using your DNS server and you don't want to stop and restart named just because you edited one domain. Type:

  • ndc reload

If you make a minor change to the /usr/local/apache/conf/httpd.conf, but don't want to restart it, type:

  • /etc/rc.d/init.d/httpd graceful to do a graceful restart. A graceful restart finishes current requests before killing the child processes.

If you want to learn more about the commands a script offers, you can simply run the script without passing any arguments to it.

root@saturn [~]# /etc/rc.d/init.d/cpanel3 <br />Usage: /etc/rc.d/init.d/cpanel3 {start|stop|status|restart}

This lets us know we can start, stop, check the running status of the service(s), or restart it. If you can't get a service to start, and don't know how to fix it, contact tech support for assistance.

How do I fix WHM News if it's broken?

Issue the following command in a terminal session:

  • rm -f /var/cpanel/objcache/whmnews

How do I reinstall Interchange?

Issue the following commands in a terminal session:

  1. /scripts/rebuildinterchangecfg
  2. /usr/local/cpanel/bin/startinterchange

How do I reinstall FrontPage extensions for the entire server?

Issue the following commands in a terminal session:

  • rpm -Uvh http://layer1.cpanel.net/fp-5.0-upgrade/frontpage/frontpage-5.0-0.i386.rpm

How can I fix "ndc connection refused" errors?

Run the following scripts:

  1. /scripts/updatenow
  2. /scripts/fixndc
  3. /scripts/fixndc
    • The fixndc script needs to be run twice.

How does cPanel move things from Alabnza servers?

Does it redo the folder structure into public_html instead of domain-www?

Yes.

Does it move the email files over from /home/user/domain-mail/emailaddressfile to /home/user/mail/emailaddress/emailaddressfile?

Yes.

Does it keep all of the email settings such as forwarders, auto replies, etc...?

Yes.

Does it also grab the parked domain names?

No.

How do I manually move an account to another server?

When an account is too large to feasibly move using the web browser, the following should work to move the account:

In this example, our domain will be domain.com and our username will be dom.

  1. Make a temp directory on /home (we'll call it /home/cptemp/) where you can store the accounts files while copying.
    • mkdir /home/cptemp
  2. Almost all space for an account is in the public_html directory, so we'll want to tar and gzip it, and move that over using scp.
    • cd /home/dom/
    • tar czvf public_html_dom.tgz public_html
    • mv public_html_dom.tgz /home/cptemp/
    • mv public_html /home/cptemp/
  3. Also, oftentimes large sites have large weblogs, which are packaged and transferred, so we take care of those as well:
    • cd /usr/local/apache/domlogs/
    • gzip domain.com
    • mv domain.com.gz /home/cptemp/
  4. Now, with these files in /home/cptemp/, try moving the account over in WHM. Hopefully, it will succeed and set up the new account on the new server. Now we go back to /home/cptemp/ and scp the files to their new home,
    • scp public_html_dom.tgz root@newserver.com:/home/dom/
  5. Enter the root pass for the new server and let it copy the file over.
    • scp domain.com.gz root@newserver.com:/usr/local/apache/domlogs/
  6. Enter the required login information.
  7. Now go to the new server and unpack the two large files you just moved.
    • cd /home/dom/
    • gzip -d domain.com.gz
    • tar xzvf public_html_dom.tgz
    • cd /usr/local/apache/domlogs/

Where is the PureFTPd configuration file?

  • /etc/sysconfig/pure-ftpd

How do I enable anonymous uploads with Pure-FTPd?

  • Find this in the Pure-FTPd configuration file (/etc/sysconfig/pure-ftpd):
    • # disallow uploads for anonymous users
    • #--anonymouscantupload

Make sure the second line has the # in front of it, then restart PureFTPd.

How can I disable the SMART errors?

Run the following from a command line:

  1. touch /var/cpanel/disablesmartcheck
  2. /scripts/updatenow

How can I debug problems with ProFTPD?

  1. Shut it down from the init script.
    • /etc/rc.d/init.d/proftpd stop
  2. Start it up from the shell with:
    • proftpd -nd9

You might need to type the full path for debug mode. The default path is:

  • /usr/sbin/proftpd

My hard drive is slow and backups take a long time. How can I fix this?

You should make sure that DMA is enabled on your drives.

ALERT! Note: Some older drives/motherboards have a problem with this, so you should ask your datacenter to be sure it's ok before enabling DMA on your drives.

  • To enable DMA for a hard drive: hdparm -d1 /dev/hda
  • To disable DMA for a hard drive: hdparm -d0 /dev/hda
  • To measure transfer rate of a hard drive: hdparm -Tt /dev/hda
  • To see what options are enabled for a hard drive: hdparm /dev/hda
  • To see more info on your drive than you wanted to know: (this will show which UDMA modes are supported/enabled) hdparm -i /dev/hda

Can I change the Home and Logout buttons through WHM branding?

These cannot be changed through branding. You will need to edit the WHM theme to modify buttons, background colors, etc.

How do I fix the error "License File Expired"?

First, check the license on http://verify.cpanel.net to ensure it is still licensed. If it is not, please contact your license provider directly.

If it says it is valid, try the following as root via SSH:

rdate -s rdate.cpanel.net 
/usr/local/cpanel/cpkeyclt 

If that does not fix the issue, please open a support request with your license provider to have a tech investigate and fix the issue.

Why am I receiving groupadd/useradd errors when attempting to create a new account?

Make sure your /etc/passwd and /etc/group file does not have the +i (immutable flag). You can check by running lsattr /etc/group and lsattr /etc/shadow. If it does have a +i flag, remove it by executing chattr -i /etc/passwd and/or chattr -i /etc/group.

It is also possible that your group shadow file is corrupt. To fix this, move /etc/gshadow to /etc/gshadow.corrupted and run grpconv to rebuild the file. You may need to remove grshadow.lock and/or group.lock if either exists.

Some services (like MySQL) aren't starting on reboots. I get errors about create/write to file in /tmp (Errcode: 13).

This is most likely due to improper permissions on the real /tmp directory. If using /scripts/securetmp at boot time, you may not notice the problem since the script sets permissions correctly after it's booted. The most common error you will see related to this is that mysqld will not start with errors like the following:

 061113 00:14:46 mysqld started 
 /usr/sbin/mysqld: Can't create/write to file '/tmp/ibEkcOgQ' (Errcode: 13) 
 061113 0:14:47 InnoDB: Error: unable to create temporary file; errno: 13 
 061113 0:14:47 [ERROR] Can't init databases 
 061113 0:14:47 [ERROR] Aborting 
 061113 0:14:47 [Note] /usr/sbin/mysqld: Shutdown complete 
 061113 00:14:47 mysqld ended 

To fix this, unmount the /var/tmp and /tmp partitions and set the permissions correctly on the real /tmp directory ilke so:

 # umount /var/tmp 
 # umount /tmp 
 # chmod 1777 /tmp 

Edit /etc/rc.sysinit and add the following line somewhere near the rest of the /tmp stuff:

chmod 1777 /tmp 

Then you can reenable /scripts/securetmp if you'd like.

If you are having trouble with other services, be sure they are enabled:

chkconfig --add pure-ftpd

If you are still getting messages after each reboot from chkservd about

services not being down, you may want to disable it with chkconfig and add it to the end of /etc/rc.local instead, to ensure that other services have time to start up first.

How do I change nameservers in cPanel?

You can change nameservers in WHM under Basic cPanel/WHM Setup.

If you need to change the nameservers associated with your domain, you may need to contact your web host and your domain registrar to update the information with them.

I see this error message: [a fatal error or timeout occurred while processing this directive]. What is wrong?

Check /usr/local/cpanel/logs/error_log for the specific error. You may need to submit a support request to get this issue resolved.

I get the error, "cannot start x server." What is wrong?

X server should not be installed on a server with cPanel on it. Only a basic installation of your operating system and the development tools libraries should be used.

How can I uninstall cPanel/WHM?

The best way to uninstall cPanel/WHM is to reformat your server. It is recommended to reinstall your operating system to return your server to a default setting if you are not going to continue to use cPanel/WHM.

How do I make sure that my server is running the latest version of cPanel/WHM?

You can find out what version of cPanel/WHM you are using by logging into WHM (WebHost Manager). The version will be displayed in the upper right-hand corner. You can also find out the version by running /usr/local/cpanel/cpanel -V from the command prompt. To see what the latest available cPanel version is in your chosen tree (STABLE/RELEASE/CURRENT/EDGE), please visit http://layer2.cpanel.net.

If you wish to update cPanel through WHM, under the cPanel cateogry, select Upgrade to Latest Version. If you wish to update cPanel from the command prompt as root, run /scripts/upcp --force.

If you would like your server to automatically update to the latest version every morning, in WHM go under Server Configuration >> Update Config and make sure you have Automatic dotted in for the tree you are using.

Can you easily change the A records to point to an IIS server through cPanel/WHM?

There are two ways you can change the A records in the WHM interface.

First, you could edit the DNS zone manually and change the A records for the domain. To do this in WHM, you would scroll down on the left side of the screen to DNS Functions. Under DNS Functions, click Edit DNS Zone. From here, you can follow the directions on the right side of the screen.

OR:

You could change the way DNS zones are created so they use A records pointed to another server. To do this in WHM, you would scroll down on the left side of the screen to DNS Functions. Under DNS Functions click Edit Zone Templates. On the right side of the screen click the link that says Standard.


Here, you can change any of the following lines as needed for A entries:

        %nameserverentry%. IN A %nameservera%
        %nameserverentry2%. IN A %nameservera2%
        %nameserverentry3%. IN A %nameservera3%
        %nameserverentry4%. IN A %nameservera4%
        %domain%. IN A %ip%
        localhost.%domain%. IN A 127.0.0.1

The %domain% tag outputs your domain name.
The %nameserverentry% tags output the names of your nameservers.
The %nameservera% tags output the IP addresses of your nameservers.

Can I install cPanel on Ubuntu?

Please see: http://www.cpanel.net/products/cPanelandWHM/linux/sys_requirements.htm for supported operating systems. We cannot offer technical support for cPanel installations on operating systems not listed on that page. Most likely, an installation on an operating system that is not listed will not function properly.

I am getting the message "unable to add the user" when trying to create an account.

Log into your server with SSH and check /home/username to see if the user has a home directory. Also check the contents of /etc/passwd to see if there is an entry for that user. You may need to use your operating system's user deletion tool to delete that user.

How do I preview a new domain before the DNS switch makes it live?

You can preview the domain using the server's IP address and your cPanel username. For example, if your IP address is 255.255.255.255 and your username is bob, you can use: http://255.255.255.255/~bob

This may be disabled for security reasons by your web host.

How do I disable/enable WHM access from the command line?

If you wish to disable access to WHM for all users, block incoming traffic on port 2086 and 2087 (this will lock you out as well).

You can also use a firewall to allow access to those ports for specific IP addresses only.

You cannot turn an account into a reseller account (grant WHM access) from the command line. However, you can use the XML API to automate this process. See http://www.cpanel.net/plugins/devel/ for more information.

You cannot shut down WHM, as the WHM services are used to ensure the server stays functioning.

How do I delete, on a daily basis, the mail statistics logs?

Mail statistics are stored in a MySQL database located at /var/lib/mysql/eximstats. You'll need to remove the entries from this database to clean it up.

Alternatively, mail logs located in /var/log, exim_mainlog, exim_rejectlog, and exim_paniclog will need to be wiped clean (or /exim/mainlog, /exim/rejectlog, /exim/paniclog for FreeBSD®) daily.

A cronjob can easily execute a script that wipes either of these daily.

Is it possible to create Domain Templates?

Yes, in cPanel we call these "Packages". You can create these configurations ahead of time and then apply them to new domains. Go to Packages >> Add Packages in WebHost Manager to get started.

I am a web hosting provider. Can I create a custom login page for my customers to log into cPanel, WHM or webmail?

Yes, you can! We have some sample source code you can look at to integrate such a customized login to an existing website. This source code is in PHP and is available at http://www.cpanel.net/cpanel-login.phps.

How do I change the version of PHP I have installed on my server?

First, log into the WHM interface. From there, proceed to the Software section by clicking on the Software icon on the main WHM page, or scroll down the left side of the screen to see the Software section. Then click on the link for Apache Update. This will bring you to the process to recompile Apache. It is through this process you can select which version of PHP you want installed on your server. Once Apache has been fully compiled, you will be able to enjoy your new PHP installation.

Does cPanel/WHM include anti-virus protection?

Yes, it comes with ClamAV at no additional charge.

Does cPanel/WHM support multiple levels of permissions?

Yes. cPanel/WHM supports root-level users that can create/modify any domain and have access to all features of the cPanel/WHM interfaces.

We also support resellers, which are intended to be used for web hosting resellers to be able to manage their own customer's accounts. However, reseller access can be easily tweaked so they only have privileges to suspend/unsuspend domains etc. Resellers have access to the cPanel interface and a limited subset of the functionality of the WHM interface.

Lastly there is the hosting account owner, who has an account in the cPanel interface and can manage most aspects of a website by themselves (within boundaries set by the reseller or root-level user).

When I create a domain, are web statistics automatically generated?

Yes. Statistics are updated at an interval you set in the WHM interface for the web statistics software you enable in WHM. Note that statistics will not be available on the newly created domain until after this interval.

cPanel/WHM comes with the following web statistics software: AWStats, Webalizer, and Analog.

Why won't the homepage of a folder automatically default to index.php?

There can be a few lines in /usr/local/apache/conf/httpd.conf that allow for a index.php file to be displayed automatically. They look like:

# DirectoryIndex: Name of the file or files to use as a pre-written HTML # directory 
index.  Separate multiple entries with spaces.
# <IfModule mod_dir.c>    DirectoryIndex index.ppl 
index.pl index.plx index.perl index.html index.wml index.cgi 
index.shtml index.jsp index.js index.jp index.php4 index.php3 
index.php index.phtml index.htm default.htm default.html 
home.htm </IfModule>

If those lines are not present, you'll need to add the following into a .htaccess file:

DirectoryIndex index.php

More information about .htaccess files can be found here: http://httpd.apache.org/docs/1.3/howto/htaccess.html.

Can I disable non-SSL login for cPanel/WHM?

Under Tweak Settings in WHM, make sure the following option is selected: Always redirect users to the ssl/tls ports when visiting /cpanel, /webmail, etc.

This will disable the use of the insecure ports and redirect users to secure ports when using the /cpanel /whm /webmail aliases.

What PHP modules and plugins does cPanel/WHM support?

The following PHP Modules and Plugins are supported by cPanel/WHM at time of writing (May 6th, 2008). Listed below are the latest versions of PHP for 4.x and 5.x that are supported at this time. Other versions may be supported as well.

If you wish to add custom configuration options, modules, or environmental variables, please see our EasyApache documentation.

4.x and 5.x:

  • EAccelerator
  • IonCube Loader
  • Suhosin
  • SourceGuardian Loader
  • Zend Optimizer

PHP 5 (5.2.6):

  • Bcmath
  • Bz2
  • CGI
  • Calendar
  • Concurrent DSO patch (Allows PHP 4 and 5 to load simultaneously as Apache modules)
  • Curl
  • CurlSSL
  • Curlwrappers
  • Dbase
  • Discard Path
  • Exif
  • FTP
  • Fastcgi
  • Force CGI Redirect
  • GD
  • Gettext
  • Iconv
  • Imap
  • MM
  • Magic Quotes
  • MailHeaders
  • Mbregex
  • Mbstring
  • Mcrypt
  • Mhash
  • Mime Magic
  • Ming
  • Mysql
  • Mysql of the system
  • MySQL "Improved" extension.
  • Openssl
  • PDO
  • PDO MySQL
  • POSIX
  • Path
  • Pear
  • PGsql
  • Pspell
  • SNMP
  • SOAP
  • SafeMode
  • Safe PHP CGI
  • Sockets
  • TTF (FreeType)
  • Tidy
  • Wddx
  • XSL
  • XmlRPC
  • Zend Multibyte
  • Zip
  • Zlib

PHP 4 (4.4.8):

  • Bcmath
  • Bz2
  • CGI
  • Calendar
  • Concurrent (Allows PHP 4 and 5 to load simultaneously as Apache modules)
  • Curl
  • CurlSSL
  • DBX
  • Dbase
  • DiscardPath
  • DomXslt
  • Exif
  • FTP
  • Fastcgi
  • Force CGI Redirect
  • GD
  • Gettext
  • Iconv
  • Imap
  • Java
  • MM
  • Magic Quotes
  • MailHeaders
  • Mbregex
  • Mbstring
  • Mcrypt
  • Memory Limit
  • Mhash
  • Mime Magic
  • Ming
  • Mysql of the system
  • Openssl
  • PDFLib
  • POSIX
  • Path Info Check
  • Pcre Regex
  • Pear
  • PGsql
  • Pspell
  • SNMP
  • SafeMode
  • Safe PHP CGI
  • Sockets
  • Swf
  • TTF (FreeType)
  • Wddx
  • XmlRPC
  • XsltSablot
  • Zend Multibyte
  • Zip
  • Zlib

How can I change the stylesheet for cPanel in WHM?

You can edit a theme's stylesheet in the Universal Theme Manager in WHM. Select the theme, and then choose the edit live option to edit style sheets, images, etc.

How do I delete an account?

You'll need to go to Account Functions >> Terminate an Account in WHM to delete an account. Please note that you cannot reverse this process. Make sure the account is backed up if you need any of the files from that account.

What is the WHM Autofixer?

The Autofixer is a collection of scripts that can be run from WHM to fix some common issues not otherwise fixable or accessible from command line.

Autofixer scripts can always be found at http://httpupdate.cpanel.net/autofixer/:

  • test — Test autofixer on your system, nothing gets changed.
  • bsdbindfix — Resolve port issue with BIND 9.
  • compresszlibfix — Fix for compress zlib error.
  • dbdmysql — DBD::mysql fix for older version of Red Hat (i.e. 7.3).
  • fpindexfile — Fix for FrontPage index.
  • iptablesflush — Flush iptables rules from WHM if you are firewalled from SSH access.
  • libxml64fix — Fix for libXML on 64-bit systems.
  • resellerresourceacctounts — Fix for reseller resource accounts.
  • safesshrestart — Restores SSH Config and restarts SSH, should you be locked out.
  • vfilterfix — Restores /etc/vfilters files.
  • yumduprpmfix — This script will attempt to locate and resolve any duplicate RPMs.

Run Autofixer from the following URL https://your.server.ip.here:2087/scripts2/autofixer. Consult the list, then enter the Autofixer script name that you want to run.

Why won't my server resolve domains?

This is usually due to an invalid nameserver setting in /etc/resolv.conf.

We recommend contacting your datacenter for suggested nameservers within their network or adding a valid public nameserver to /etc/resolv.conf.

How do I set my cPanel server under a NAT configuration?

We do not currently support NAT configurations due to custom changes that will be needed to the way accounts are created. You may wish to look at /usr/local/cpanel/etc/httptemplates if you require a NAT configuration.

How do I use WHM on a PDA?

Point your PDA's web browser to the address https://server:2087/scripts/command?PFILE=main where "server" is the IP or hostname of your server, or a domain hosted on the server.

I've installed Tomcat. How do I install servlets on an account?

In WHM go to Account Functions -> Install Servlets. Select an account or domain you wish to have servlets installed upon, and apply the settings.

When logging into cPanel, why do I get a 404 error saying it can't find a theme (./frontend/bluelagoon/index.html), and the page cannot be displayed?

This is more than likely because the theme is missing. To get cPanel working again, edit /var/cpanel/users/username, change the theme to the default, and save it.

This should bring up the default theme. If not, look in /usr/local/cpanel/base/frontend/ for available themes and change it to one that is there.

You can also install new themes from WHM.

cPanel won't update. I can run /scripts/upcp, but the version stays the same even though it's old. Why?

You might have /tmp mounted with nosuid and noexec. The upgrade process stores its upgrade file in /tmp/, and runs it from there. /tmp should be mounted without noexec.

Edit /etc/fstab and reboot to fix.

Whenever I set up a domain it says "ndc can't connect, connection refused." What is this?

ndc is the name daemon control program. If you are getting that error, run the following script as the root user:

  • /scripts/fixndc

If the problem persists, fill out a support request to have the named configuration looked at.

Is cPanel continuing to support FrontPage® extensions? How about on Apache 2?

Yes, cPanel will continue to support FrontPage extensions for the foreseeable future. Additionally, FrontPage extensions are supported on Apache 1.3, 2 and 2.2.

How can I copy files from one domain directory to another?

You'll need root privileges to copy the files using the cp command. For example, you could copy one directory to another place by running: cp -R /home/dave/public_html/photos/ /home/john/public_html/images/.

For more information on the cp command, type man cp from the command line.

Otherwise, you could use the File Manager in cPanel to download the files you wish to copy. Then log into the other domain's account and use the File Manager to upload the files to that account.

Why won't my X server GUI work after installing Cpanel?

Due to the numerous security problems that plaque running X on a server, cPanel uninstalls it and keeps it from running. You should never run X on a public server.

Quotas are not working. How can I fix them?

Check for quota support on the mounted filesystems:

FreeBSD:
Output of `mount` , look for "with quotas".
/dev/ad0s1h on /home (ufs, local, with quotas, soft-updates)
In /etc/fstab
/dev/ad0s1h /home ufs rw,userquota,groupquota 2 2

Linux:
Output of `mount` , look for "usrquota".
/dev/hda6 on /var type ext3 (rw,usrquota)
In /etc/fstab
LABEL=/var /var ext3 defaults,usrquota 1 2

If the entries are missing from /etc/fstab, add them. If they are present, verify that there is support for quotas in the kernel and that any relevant modules are loaded.

Check that the quota files are present and not zero byte files:
FreeBSD:
-rw-r----- 1 root operator 2097120 Apr 30 16:19 quota.user

Linux :
-rwxr--r-- 1 root root 8192 Dec 26 20:18 aquota.user*
-rwxr--r-- 1 root root 2097120 Apr 30 04:19 quota.user*

If these files do not exists, run /scripts/initquotas. If they do exist, but quotas are not working, you can either delete the quota files and run initquotas or run /scripts/fixquotas.

After this, repquota -a should print out the soft/hard limits with grace periods for all users.

If quotas are still not reporting anything in WHM and/or cPanel, check /var/cpanel/cpanel.config for

  • disablequotacache=0

If that is set to 0, try setting it to 1 and see if that fixes it.

How can I find out where all a user's files are?

If there is a discrepancy between quotas and a du -sh /home/username, chances are, some other files on the system are owned by that user's UID. To find these, type:

  • find / -user username -ls

Run that and you will get a long list of all files owned by that user. It might be wise to redirect the output to a file to browse through later.

Depending on the files, it's usually better to chown them to the root user rather than delete them.

Is cPanel compatible with mod security (mod_security)?

Yes, you can install mod_security in WHM under Plugins. More information about configuring mod_security can be found at: http://modsecurity.org/

How can I obtain information about developing software that is integrated with WHM?

To create a piece of software that interacts with WHM, to add an icon for your software inside of cPanel, or to get information from cPanel/WHM, you can use our Plugins system along with our XML API.

We offer API documentation here. We recommend using the XML API in conjunction with API2 to make cPanel calls.

You can also create cPAddon scripts which allow customers to download your software to their server and then domain owners can install it from the cPanel interface section Site Software. Documentation for this type of integration is available here.

For more information about interacting with cPanel/WHM as a developer, read through our Developer Resources.

How can I put the Change Language icon in the Preferences section of cPanel?

You will need to ensure that the Feature List for the account has the Change Language option checked. This Feature List can be found in WHM under Feature Lists. It will be associated with the Package that the account is using.

How do I set up personal nameservers in WHM?

You will need an IP address for each nameserver.

Under Basic cPanel/WHM Setup, scroll down to Primary Nameserver.

Now add your nameservers in the fields available. Click on Assign IP Address next to each nameserver to assign it an IP. Then add an A entry so they will resolve through DNS.

Finally, make sure that you scroll down and click on Nameserver Setup under Service Configuration, and enable the nameserver.

How do I stop users from getting the "There is a problem with this website's security certificate" message when logging into cPanel?

Under Manage Service SSL Certificates in the Service Configuration section of WHM, you can change the certificates for cPanel/WHM/webmail, your mail servers, etc. You'll need to replace the self-signed certificate with one trusted by the common browsers.

To do this, you can purchase a SSL certificate through WHM for your hostname by using Purchase & Install SSL Certificate under SSL/TLS.

How do I increase the maximum number of IMAP or POP3 connections?

Go to Service Configuration >> Courier Configuration and set the values as required.

How do I call the WHM XML API?

You can find full XML API documentation at: http://www.cpanel.net/plugins/xmlapi/index.html

Why did Munin stop updating?

Munin is a cPanel Plugin that displays information about CPU, Exim, Apache, MySQL usage, and other information, using rrdtool. If it fails to update, there is likely a permissions issue that is causing it.

First, check to make sure that cron is running, and that there is a crontab entry for Munin. Next, check /var/lib/munin and /var/log/munin. The files in both directories must be owned by munin:munin. If the files in /var/log/munin are not owned by munin:munin, the log files will be updated, but the graphs displayed by Munin will not be updated.

This permissions issue can be corrected by running the following commands as root:
chown -R munin:munin /var/log/munin
chown -R munin:munin /var/lib/munin

Now run Munin manually from the command line: sudo -u munin munin-cron

You should see entries added to /var/log/munin/munin-update, and no errors in the log file. Now refresh the Munin display in WHM. The graphs should be updated.

The weekly graphs may not be updated immediately. These will be updated at the appointed time configured in the crontab.

Does cPanel support Resin? Does cPanel support other Java Application Servers?

cPanel currently supports Tomcat as a Java Application Server. To request other servers, please submit a feature request to bugzilla.cpanel.net.

How can I create a demo version of cPanel?

To do this, create a new "dummy" account in WebHost Manager. Feel free to use a fake domain name. Then, you can use branding to modify the account with your company's logo and look if you'd like.

Now, go to Account Functions >> Disable or Enable Demo Mode in WebHost Manager and turn the account into a demo account.

Why does my Ruby on Rails install not work?

On Ruby on Rails with cPanel, we use the standard set of tools that Rails provides, rather than creating our own. This makes troubleshooting relatively easy.

The error_log is always extremely useful with Rails. 90% of the time, a good indication of what is wrong with the Rails installation will be there. Furthermore, if it is an application-specific issue, mongrel maintains its own error log at {appbase}/log/mongrel.log. If an application is starting and failing without anything in the error_log, there will probably be an indication of the problem in here as well.

After that, there need to be a few gems installed. You can check which gems are installed via "gem query":

  • mongrel
  • rails
  • rake

If any of these are missing, you can install them via gem install <name>. If the wrong version is installed, gem uninstall works just fine. There will also be some dependencies that need to be installed as well.

Once you have verified all of this and the application is still not starting correctly, you can start the mongrel server manually with the command mongrel_rails start -p -d -e production -P log/mongrel.pid from the Rails application's base directory as the user who owns the Rails application. The port can be found in ~/.cpanel/ruby-on-rails.db.

If after following these steps you are still not able to fix your Rails installation, please open a ticket with either your data center or us.

I just created a new account, yet it shows that I'm already using disk space?

When a user has been deleted from the system (terminated account), they may still have files owned by that old user's UID. When a new account is created, the system assigns it the next availble UID, usually that of a terminated account. thus the new account assumes ownership of all files owned by that old user, giving the appearance that the user is already over quota without ever having uploaded anything.

Also, tarballs (.tgz, .tar, .tar.gz) may have files owned by the user they were tarred up with on a seperate system, and when untarred on your server, they are assigned ownership of whatever account has that UID.

This is answered here.

How can I set up a default page which is generated when any new domain is created on the server?

You can set up a default site in the directory /root/cpanel3-skel/public_html/, and it will be the default website for all accounts added afterwards.

How does yum need to be configured to work with cPanel?

cPanel/WHM requires that certain packages be excluded due to the fact that cPanel handles its own installations of services that are separate from what the distros provide. If you have modified the yum.conf, you will want to ensure that the follow excludes do exist:

apache* bind-chroot courier* dovecot* exim* httpd* mod_ssl* mysql* nsd* perl* php* proftpd* pure-ftpd* spamassassin* squirrelmail*

We also strongly recommend using only the vendor-provided distributions, as cPanel is tested only using these packages. 3rd-party repositories such as RPMForge can replace vital parts of the system that cPanel relies on, and cause unexpected results.

After Installation I am having problems with X windows / XFree86?

You cannot run cPanel on a server with Xwindows (XFree86, etc.), as it is very insecure and has no place in a server environment. No support will be given in getting back Xwindows once cPanel has been installed.

When will cPanel support IPv6?

cPanel is committed to providing support for applications and technologies that our customers demand. IPv6 is gaining some momentum, but it has not yet become a standard. As the leader in web hosting automation software, cPanel has its team carefully watching this protocol and will release support for it as the demand increases.

Integration of IPv6 will be an effort that requires both software used within cPanel and the cPanel software itself to be enhanced.

IPv6 Resources:

Want to help shape enhancements in cPanel?

Click the link below to vote on this feature and sign up to be notified when it is released. Your vote helps our development team understand the desire for a specific enhancement such as IPv6, so it can be added to upcoming roadmaps. If you sign up to be notified, you will receive updates via email.

Vote now: http://bugzilla.cpanel.net/show_bug.cgi?id=2045

How can I (or my customers) access webmail, cPanel, and WHM on port 80? I am behind a strict firewall.

We have built functionality into cPanel to use cpanel.domain.com and webmail.domain.com over port 80, so that you can still access cPanel and your webmail behind a proxy server. Simply replace domain.com with the name of your website.

This functionality can be turned on and off in the Tweak Settings menu of WHM. The specific setting is called Automatically create cpanel, webmail, webdisk and whm proxy subdomain DNS entries for new accounts. When this is initially enabled, it will add appropriate proxy subdomain DNS entries to all existing accounts. Use /scripts/proxydomains to reconfigure the DNS entries manually.

Can I run cPanel behind NAT?

Short answer: No, it is not supported.

It was once semi-possible to run cPanel behind a NAT firewall; however, the system has changed somewhat, so that if you use more than one server behind the NAT (more than one appears from behind the same public IP), the license server will lock the public IP out to prevent abuse.

There are other technical problems, such as virtual hosting with Apache and domain->IP mapping, DNS, and so on, that prevent us from supporting this method.

Where do I go to find out when a new build of cPanel is released?

Some builds are released quicker than others. For example, CURRENT builds are released quicker than RELEASE builds, and EDGE builds are released quicker than CURRENT Builds.

To find the latest builds, go to http://layer2.cpanel.net, and look for your operating system (FreeBSD or Linux).

Thanks for using cPanel!

I use the APF firewall rules on my server; which ports should I allow?

# Common ingress (inbound) TCP ports
IG_TCP_CPORTS=" 20,21,22,25,26,53,80,110,143,443,465,993,995,2077,2078,2082,
2083,2086,2087,2095,2096,3306,6666"
   
# Common ingress (inbound) UDP ports
IG_UDP_CPORTS="21,53,465,873,2077,2078"
   

# Common ICMP (inbound) types
# 'internals/icmp.types' for type definition; 'all' is wildcard for any
IG_ICMP_TYPES="3,5,11,0,30,8"
 
# Common egress (outbound) TCP ports
EG_TCP_CPORTS="21,25,26,37,43,53,80,113,465,873,3306"
 
# Common egress (outbound) UDP ports
EG_UDP_CPORTS="20,21,53,465,873"
 
# Common ICMP (outbound) types
# 'internals/icmp.types' for type definition; 'all' is wildcard for any
     EG_ICMP_TYPES="all"

Thanks to Billy Vierra for the info.

"rndc: connection to remote host closed." What does this mean?

Attempting to restart bind 
Waiting for bind to restart.... . . . . . . . . . . finished. 

rndc: connection to remote host closed 

This may indicate that the remote server is using an older version of the command protocol, this host is not authorized to connect, or the key is invalid.

To fix this issue you may try running /scripts/fixndc.

Topic revision: r16 - 05 Nov 2009 - 19:38:40 - Main.JustinSchaefer
 

Copyright © cPanel 2000-2010.