The Official Cpanel Newbie Guide dedicated to providing web hosting companies and beginners everything you need to start using your Cpanel web server. HOWTO: Cpanel and WHM Newbie Guide - what you need to get started!
This guide assumes you already have Cpanel installed and we'll walk you some of the very basics of using your new Cpanel server. We expect you have some knowledge of what cpanel actually is and know a bit about server administration. Always consider hiring a professional to go over your system if you just purchased a new system. This guide has been created by Steven Leggett and cannot be reproduced without my expicit permission. Please link to this page for the latest updates to this guide.
Last Update: Feb 23, 2006
Before we get started I'll go over some of the settings of the server and use these icons as a guide if something should be turned on or off in WHM.
= Check it = Do not enable it
Login to WHM Login to Cpanel
You need to login to your box right well here are a few things to help you. SSL logins are highly recommended for security - please see our Force SSL logins in the Cpanel Tutorials for more details.
Now login to your WHM as the root user.
This is the main section to your web server where you can set the options once and will probably never need to change them.
Click on Basic cPanel/WHM Setup
Most of these sections are self explanatory with examples of what they do. Just read them to get familiar. I'll mention the important ones.
Main Shared Virtual Host IP:
This is your servers main IP address to be used be default with all shared hosting accounts. This should be setup by default and you probably won't need to change this unless you want to use a different IP.
Server Contact E-Mail Address:
You will get email alerts sent to this address and make sure you have a decent size inbox for them, something over 2 megs because you will often receive updates, log files and all kinds of other goodies. Preferrably an email account hosted on a different system like gmail, hotmail or yahoo. You don't want to have it mail your local accounts in the event of a problem.
Server Contact Pager Address:
Another contact method for receiving special alerts if your server goes down. We recommend leaving this empty and using a third party monitoring service like SiteUptime.com or Alertra.com because if your server is already down, how will it contact you :)
Default cPanel Theme:
The theme you want to be used be default with all new hosting accounts. There are a few to choose from and if you install a custom theme you can enter the name of it here. To see what themes you have installed on the server, scroll down to the left hand size and look for the title: Themes, click on List Installed cPanel Themes. Recommended theme: x
Default Home Directory:
We recommend setting this to: /home It should already be setup.
Home Directory Prefix:
Leave this set to home
Alternate Main Ethernet Device:
Don't touch this unless you've setup a custom ethernet configuration. Read on..
Many people get confused about what this is. Basically you make up the prefix in it and apply the main domain used to host your sites to it.
Example: If the main site for the server was test123.com I could set the hostname to server1.test123.com or mars.test123.com The prefix helps you identify which server this is. Make sure to set your hostname properly by using the Change Hostname link at the top left, this should match what you set there.
NOTICE: In order for your system to be able to email and receive email other servers you need to use a VALID and WORKING domain name for this. Make sure the domain you choose is hosted on the server! Otherwise email will be rejected from your system in most instances.
Missing Hostname A record Warnings: Once you modify your Hostname you need to Add A DNZ Zone for it. This is to ensure when a mail server or systems checks to see if your server is online, it will respond. You can add an A record to your hostname in: Network Setup >> Hostname.
There are two options for these depending on what you're doing.
Option 1) Shared Nameservers
This is where you would use your datacentre's default name servers such as ns1.ev1servers.net and ns2.ev1servers.net
No other configurations are required making this a snap. You would when set all your domain names nameservers, that you want to put on the server , to the same name servers that you entered here. Keep in mind if you want to add things like a subdomain you have to go to your hosting providers domain system to add the DNS Zone changes. This is NOT recommended.
Option 2 Private Nameservers - A little harder but HIGHLY recommended
This can get very ugly if you don't know what you're doing. I strongly recommend you use your own private nameservers for your dedicated server. This is because you then have control of the DNS Zone associated with your site, so when you add things like subdomains you don't need to add them somewhere else because your server will handle everything. Cpanel Nameserver Guide here.
Enter the correct names, click assign IP address. Then assign A entry for this nameserver. It's important you do not miss these steps and that your server has 2 free(available) IP addresses to use. Contact the datacenter if you're not sure. You can check what IP's are available in WHM >> IP Functions >> Show or Delete Current IP Addresses
Apache Access Log Style:
Set this to: combined
First off is updates with Cpanel: Update Config
How your software gets updated.
Login to WHM (Web Host Manager) and go to, Update Config:
Right from a programmers hands, this is the first layer of Cpanel that is used for testing, patching etc. It has the latest fixes but isn't as well tested as other releases.
This is upgraded from the edge release so it has been tested a bit more.
Again another layer of testing, it is older code and has been run on more systems but it takes longer for updates to get to it. Recommended Selection
Very old but the most stable version around, it has been tested the longest.
We recommend you set to manual updates, Release option. I prefer manual over automatic because I like to keep a better eye on what has been changed.
If you select manual and you want to perform the update simply scroll down WHM and go to Cpanel > Upgrade To Latest Version.
This will update Exim, scripts, themes, Perl and Cpanel if updates are available - it will only update to the Cpanel release type you selected previously.
To see if new updates are available go to http://layer2.cpanel.net
You can also click on the Change Log at the top of WHM to see their latest updates and releases.
This is one of the most important sections of the configuration for your server. It's where you set settings that apply to all users on the server, like enabling certain stats programs.
Domains: Adding domains to the system.
Allow Creation of Parked/Addon Domains that are not registered
Allow Creation of Parked/Addon Domains that resolve to other servers (ie domain transfers) [This can be a major security problem. If you must have it enabled, be sure to not allow users to park common internet domains.]
Allow users to Park/Addon Domains on top of domains owned by other users. (probably a bad idea)
Prevent users from parking/adding on common internet domains. (ie hotmail.com, aol.com)
Mail: Email and related settings
Add the mail. prefix for mailman urls (ie http://mail.domain.com/mailman)
Attempt to prevent pop3 connection floods
BoxTrapper Spam Trap
Default catch-all/default address behavior for new accounts. fail will generally save the most CPU time.
Set to FAIL. This means that when someone sends to email@example.com it will bounce
Email users when they have reached 80% of their bandwidth . Highly recommended
Horde Webmail - a webmail interface that has custom skins, notes, filters and more.
Include a list of Pop before SMTP senders in the X-PopBeforeSMTP header when relaying mail. (exim 4.34-30+ required)
Mailman Mailing list software, clients can use it through their own Cpanel.
Neomail Webmail - Pretty crap webmail client with no features and not any longer supported
Number of minutes between mail server queue runs (default is 60). I'd leave it at 60
Prevent the user 'nobody' from sending out mail to remote addresses (php and cgi scripts generally run as nobody if you are not using phpsuexec and suexec respectively.) Do NOT turn this on if you're not using PHPSuexec, since you're reading this guide then leave this option UNCHECKED or all contact form mail will BREAK!
Silently Discard all FormMail-clone requests with a bcc: header in the subject line - Helps cut down on mail queue build up.
SpamAssassin - Awesome spam filtering tool, highly recommended.
SpamAssassin Spam Box delivery for messages marked as spam (user configurable) - allows users to configure it through their control panel, very nice.
SquirrelMail Webmail -Another webmail client, I don't like it personally.
The maximum each domain can send out per hour (0 is unlimited): If you have clients on your server I suggest entering a high value such as 500. This limits the sending amount of mail for the entire domain, not per email address. If they start reporting they can't send messages out you can increase it.
The number of times users are allowed to check their mail using pop3 per hour: 60 is recommended. That's 1 check per minute which is high enough.
Track the origin of messages sent though the mail server by adding the X-Source headers (exim 4.34+ required)
MySQL: Database stuff
Use old style (4.0) passwords with mySQL 4.1 (required if you have problems with php apps authenticating) - NOTE: Only use this if you have MySQL 4.1 installed.
Disable Suspending accounts that exceed their bandwidth limit (will clear all suspensions is disabled) - Bad idea to turn this on. You WANT the account to get suspended so they're forced to upgrade and don't go crazy with bandwidth.
Disk Space Usage Warnings - Email users with their account starts running out of disk space.
Email Box Usage Warnings - Email users with their mailbox starts running out of disk space.
Software: - Extra server wide software available
Interchange Version to use (if you disable interchange, you must turn off the service in the service manager). I suggest disabling it, old and useless.
Loader to use for internal cPanel PHP (Use oldsourceguardian for version 1.x and 2.x). I suggest sourceguardian.
Stats Programs: - How you can view website traffic
Awstats Reverse Dns Resolution
Awstats Stats - I like this, easy to use
Webalizer Stats - Has better file tracking, history features than Awstats
Stats and Logs: How the server handles log files
Allow users to update Awstats from cPanel - Lets them update stats manually, adds to server load.
Delete each domain's access logs after stats run
Do not include password in the raw log download link in cPanel (via ftp).
Do not reset /usr/local/apache/domlogs/ftpxferlog after it has been seperated into each domain name's ftp log
Exim Stats Daemon (required for smtp bandwidth logging; must also be modified in the service manager as well)
Keep Stats Log (/usr/local/cpanel/logs/stats_log) between cpanel restarts (default is off)
Keep log files at the end of the month (default is off as you can run out of disk space quickly)
Number of days between processing log files and bandwidth usage (default 1, decimal values are ok): 1
Stats Log Level (default is 1, larger numbers indicate more debug information in /usr/local/cpanel/logs/stats_log) [0...10]: 1
The load average above the number of cpus at which logs file processing should be suspended (default 0): 10 I suggest this value
When viewing bandwidth usage in WHM, always display in Megabytes first.
Stats and Logs: When you click on Server Status in WHM or Cpanel
The load average that will cause the server status to appear red (leave blank for default): 5 to 10 is recommended
Allow Sharing Nameserver Ips - Allows you to give resellers private nameservers without dedicated IPs
Allow cPanel users to install SSL Hosts if they have a dedicated ip. - Users usually screw this up, I suggest turning this feature off and installing it for them for a fee.
Allow cPanel users to reset their password via email - Security issue, keep this off
Allow cpanel and admin binaries to be run from other applications besides the cpanel server (cpsrvd).
Allow perl updates from rpm based linux vendors
Always redirect users to the ssl/tls ports when visiting /cpanel, /webmail, etc.
Disable Disk Quota display caching (whm will cache disk usage which may result in the display of disk quotas being up to 15 minutes behind the actual disk usage. Disabling this may result in a large performace degradation.)
Disable Http Authentication for cPanel/WebMail/WHM Logins (forces cookie authentication)
Disable login with root or reseller password into the users' cPanel interface. Also disable switch account dropdown in themes with switch account feature.
Disable whois lookups for the nameserver ip manager.
Display Errors in cPanel instead of logging them to /usr/local/cpanel/logs/error_log
Do not warn about features that will be depreciated in later releases (Warning: If you check this box, you will not be able to learn about features that will be disappearing in future releases. This could lead to a non-functional server when the feature is finally removed.)
Do not warn users about the system backup being disabled in cPanel.
Configure Backup under WHM:
System Health and running services - eg Apache, Exim etc.
Green = Good | Yellow = Warning | Red = Trouble
Clients can see the service status through their own Cpanel as well.
Things to pay attention to:
- Server Load 0.12 (1 cpu) - the lower the better! You should be worried if its at 7 or higher
- Memory Used - Should be worried if its at 75% +
How to install APF (Advanced Policy Firewall)
Apache Logs Explained
No one tells you where they are but it's very important to know
All users have their own seperate log files - every domain has their own logs - eg: sitename.com
Other things to know:
Restart Cpanel in SSH (Shell is like a DOS prompt)#:
Cpanel Manual Backup & Update - if backup doesn't work through WHM - SSH command #:
Apache Config Test in SSH: -test httpd.conf file for errors!
The configuration file is located in /usr/local/apache/conf/httpd.conf so you may need to edit it in Pico or your favourite editor and make changes.
Manual Stop - Start of services in SSH: (start | stop | restart) #
That's all I can think of for now! Overall Cpanel is easy to use and has some nice automated features but a control panel can only do so much, you need to get your hands dirty sometimes!
Just a note there are MANY other settings to go over to way to many to cover in this guide. It's recommended you hire a server administrator to go over your server and configure it properly. Just checking off values in WHM doesn't properly secure your server, you need a skilled system administrator to review your system on this. You can always contact me directly to have me go over your server for a nominal fee. Always glad to help out.
Best of luck
WebHostGear.com is a hosting directory, not a web host.
Copyright © 1998-2014 WebHostGear.com