CPanel

From Server Knowledge Base
Jump to: navigation, search

cPanel and Web Host Manager (WHM) tie in together. To preview a domain before DNS, enter http://IPaddress/~FTPusername

Add FTP User

WHM > Account Information > List Accounts > click the cPanel logo for the domain > Files > FTP Accounts

Access PHPMyAdmin/MySQL/FTP account or reset password (see below too)

Home > Main > Account Functions > Password Modification > click the domain/account > enter a new password > Change Password

Addon Domain error

Sorry, the domain is already pointed to an IP address that does not appear to use DNS servers associated with this server. Please transfer the domain.

http://forums.cpanel.net/f5/yet-another-problem-adding-addon-domains-thread-99901.html
http://www.thesishosting.com/2010/11/topics/whmcpanel-topics/creating-addon-domain-for-site-hosted-elsewhere-in-cpanel
http://www.webhostingtalk.com/showthread.php?t=572005
http://forums.eukhost.com/f27/problems-add-domain-12587/

Changing hostname shows license message

Follow the guide provided by WHM/cPanel and then if that does not work, see below.

Log into SSH, type hostname WhatYouWantItToBe, it must be something.yourdomain.xxx and then type /usr/local/cpanel/cpkeyclt

Then load WHM/cPanel as you would normally, but don't forget to add an A entry for the new hostname.

Cheat Sheet

Check cPanel version

cat /usr/local/cpanel/version && echo

Clear cphulk via SSH

mysql
use cphulkd
show tables;
select * from blacklist;
select * from brutes;
BEGIN;
delete from brutes where IP="<yourIPaddress>";
select * from brutes;
COMMIT;
exit

Configure email in Mail Client

Log into cPanel, go to Email Accounts, on your mail account click More and then Configure Mail Client.

cPanel PHP Configuration

Getting into SSH after being locked out

If you have root access disabled, have forget to add an FTP user to the sudoers file, and the enabled shell access is not working, use this:

http://www.serveridol.com/2011/06/06/whmcpanel-ssh-root-login-disabled-and-su-getting-rejected

Then SSH in, then use su and enter the root users password.

Installation check/setup log

If cPanel is not accessible yet, if you SSH into the server you may see the below which indicates it is still building:

*************************************************************
************************ WARNING ****************************
*************************************************************
Your server is currently being configured for cPanel.

The cPanel installation changes a number of system files, and
for this reason it is NOT RECOMMENDED that you use your
server during this time.

We'll send you an email when cPanel is installed and your
server is ready to go!

Best Wishes,
The cPanel installer
*************************************************************
tail -1 /var/log/cpanel-install.log

/var/log/cpanel_setup.log

Error log: /usr/local/cpanel/logs/error_log

Installing an SSL

Ensure the SSL's are formatted properly as seen here, the easiest way to do this is in notepad.

In the .crt field, place the SSL itself. You can normally leave the private key it generates alone.
In the .key field you can place the Private Key.
In the CA field place the appropriate root intermediate CA certificate bundle. Below are the ones from Global Sign, do not use these if your SSL is not through Global Sign:

DomainSSL Root Bundle
OrganizationSSL Root Bundle
ExtendedSSL Root Bundle

If the SSL is from another provider, searching root ca bundle <SSL provider> in Google will normally find the right one for your domain type.

Use the username nobody. Then click Submit. If you do not use the username nobody, you may run into this error.

Wildcard SSL

Note that for wildcard SSL installation, you need to:

  • Enter the CSR and Private Key in the correct fields - it is recommended to upload the file rather than copying the text to ensure correct formatting. Alternatively put the SSL parts into Notepad. You need to included the == BEGIN == and == END CERTIFICATE == parts.
  • Enter the domain using the format *.domain.com
  • Enter the username as nobody

Install Ioncube Loader

Guide 2

Install PHP Motion

Install Tomcat 6

Look into the Addon Domain feature in cPanel.

Reset cpanel account password

In cPanel you have to know the original password. If you have access to WHM you can do this for a cPanel account without knowing the original password at:

Account Functions >> Password Modification

Running it in a NAT environment

Support MySQL version

cPanel/WHM does support MySQL 5.5:

docs.cpanel.net/twiki/bin/vief/AllDocumentation/1134ReleaseNotes#Appendix A: Provided third-party cPanel documentation
http://vbtechsupport.com/1254

System Requirements

The MySQL® server is currently offline

If you get the above message in cPanel when clicking > MySQL database and MySQL is actually running.

Go to SQL Services >> MySQL Root Password and reset the password.

Root and cPanel account interaction for PHPMyAdmin

If you log into WHM at https://ipaddress:2087 (as root obviously), then try to go to PHPMyAdmin within a cPanel acount, it will tell you that you cannot log into PHPMyAdmin with the root/reseller password.

So log into cPanel at https://ipaddress:2083 and then try to access PHPMyAdmin, it will try log in as root!

Log in with the root user's credentials and it should work. Madness.

Unable to find packages/software

Check /etc/yum.conf and remove the software* exclude entry. By default a cPanel CentOS server may have the following within that file:

exclude=apache* bind-chroot courier* dovecot* exim* filesystem httpd* mod_ssl* mydns* mysql* nsd* perl* php* proftpd* pure-ftpd* ruby* spamassassin* squirrelmail*

Also see this.

Webmail link

domain.co.uk:2096

WHM Install Note

You can only install one SSL certificate per IP address for your websites. This means that in order to install an SSL certificate, the account must have a dedicated IP address. If your server only has one IP address, and you do not wish to set up a shared SSL certificate, you cannot use this function and will need to manually configure this process.

http://docs.cpanel.net/twiki/bin/view/11_30/WHMDocs/InstallCert

Website home directory

/home/DomainWithoutSuffix/public_html