Naming Your Server - Dedicated Server Names Published: Mar 26, 2004
  • Rating

    3/5

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!

Cpanel Newbie Guide

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 = Check it No = 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.

  • WHM
    - Secure SSL https://sitename.com:2087
    Notice: Root user should only ever login using the secure HTTPS login!
    - Regular http://sitename.com:2086 and http://yourdomain.com/whm
  • Cpanel
    - Secure SSL https://sitename.com:2083
    - Regular http://sitename.com:2082 and http://yourdomain.com/cpanel
  • Webmail
    - Secure SSL https://domain.com:2096
    - Regular http://domain.com:2095 and http://yourdomain.com/webmail

Edit Setup
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.


WHM Setup Guide

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

Minimum Uid:
Leave blank

Alternate Main Ethernet Device:
Don't touch this unless you've setup a custom ethernet configuration. Read on..

Hostname:
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.


Primary Nameserver:
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.

Primary Nameserver
ns1.yourserverdomain.com 

Secondary Nameserver
ns2.yourserverdomain.com

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:

WHM Setup Guide

Edge Release:
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.

Current:
This is upgraded from the edge release so it has been tested a bit more.

Release:
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

Stable:
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.



Tweak Settings:
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.

WHM Setup Guide

Domains: Adding domains to the system.
No Allow Creation of Parked/Addon Domains that are not registered  

Check 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.]  

No  Allow users to Park/Addon Domains on top of domains owned by other users. (probably a bad idea) 

Check Prevent users from parking/adding on common internet domains. (ie hotmail.com, aol.com)

Mail: Email and related settings
No Add the mail. prefix for mailman urls (ie http://mail.domain.com/mailman)  

CheckAttempt to prevent pop3 connection floods  

CheckBoxTrapper Spam Trap

Check 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 nonexisting@company.com it will bounce

CheckEmail users when they have reached 80% of their bandwidth . Highly recommended

CheckHorde Webmail - a webmail interface that has custom skins, notes, filters and more.

No Include a list of Pop before SMTP senders in the X-PopBeforeSMTP header when relaying mail. (exim 4.34-30+ required)

Check Mailman Mailing list software, clients can use it through their own Cpanel. 

No  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

No 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!

CheckSilently Discard all FormMail-clone requests with a bcc: header in the subject line - Helps cut down on mail queue build up.

CheckSpamAssassin - Awesome spam filtering tool, highly recommended.

Check SpamAssassin Spam Box delivery for messages marked as spam (user configurable) - allows users to configure it through their control panel, very nice.

NoSquirrelMail 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. 

No Track the origin of messages sent though the mail server by adding the X-Source headers (exim 4.34+ required)

MySQL: Database stuff
CheckUse 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.

Notifications:
No 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. 
 
CheckDisk Space Usage Warnings - Email users with their account starts running out of disk space.

CheckEmail Box Usage Warnings - Email users with their mailbox starts running out of disk space.

Software: - Extra server wide software available
NoFormMail-clone cgi

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 
NoAnalog Stats  
NoAwstats Reverse Dns Resolution  
CheckAwstats Stats  - I like this, easy to use
CheckWebalizer Stats - Has better file tracking, history features than Awstats

Stats and Logs: How the server handles log files
CheckAllow users to update Awstats from cPanel - Lets them update stats manually, adds to server load.
CheckDelete each domain's access logs after stats run 
NoDo not include password in the raw log download link in cPanel (via ftp).  
NoDo not reset /usr/local/apache/domlogs/ftpxferlog after it has been seperated into each domain name's ftp log 
CheckExim Stats Daemon (required for smtp bandwidth logging; must also be modified in the service manager as well) 
NoKeep Stats Log (/usr/local/cpanel/logs/stats_log) between cpanel restarts (default is off)  
NoKeep 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
CheckWhen 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

System:
CheckAllow Sharing Nameserver Ips  - Allows you to give resellers private nameservers without dedicated IPs
NoAllow 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.   
NoAllow cPanel users to reset their password via email  - Security issue, keep this off
NoAllow cpanel and admin binaries to be run from other applications besides the cpanel server (cpsrvd).  
No Allow perl updates from rpm based linux vendors  
NoAlways redirect users to the ssl/tls ports when visiting /cpanel, /webmail, etc.  
No 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.)  

NoDisable Http Authentication for cPanel/WebMail/WHM Logins (forces cookie authentication)  
NoDisable login with root or reseller password into the users' cPanel interface. Also disable switch account dropdown in themes with switch account feature.  

CheckDisable whois lookups for the nameserver ip manager.  
NoDisplay Errors in cPanel instead of logging them to /usr/local/cpanel/logs/error_log  
NoDo 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.)  

NoDo not warn users about the system backup being disabled in cPanel.



Backups
Configure Backup under WHM:

  • Backup Status: Enabled
  • Backup Interval (Note: Selecting Daily Backup with give you monthly and weekly as well, Selecting Weekly backup will give you monthly as well.) Daily or weekly - up to you
  • Days to run backup (explanitory)
  • Remount/Unmount backup drive (requires a seperate drive/coda/nfs mount) - Disabled
  • Bail out if the backup drive cannot be mounted (recommended if you have selected the above option) - Enabled
  • Incremental backup (only backup what has changed. (**No Compression**) - Disabled
  • Backup Accounts - Enabled
  • Backup Config Files (not needed to restore specific accounts) - Enabled
  • Sql Databases (at least per accounts is needed to use the restore feature) - Per account
  • Backup Raw Access Logs - Enabled
  • Backup Destination (this should be a dir/nfs/coda mount with at least twice the space of all your /home* partitions. Setting this to /home is a VERY BAD IDEA.): - /backup
    (Note: you need a second hard drive and should have it set to /backup in your fstab file)

Service Status
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% +

Firewall
How to install APF (Advanced Policy Firewall)

Logs
Apache Logs Explained
No one tells you where they are but it's very important to know
*Important!
All users have their own seperate log files - every domain has their own logs - eg: sitename.com

  • Exim: - /var/log/exim_mainlog -/var/log/maillog -/var/log/exim_paniclog
  • Apache: -Error Log: /usr/local/apache/logs/error_log (404 not found errors, etc)
    - Access Log: /usr/local/apache/logs/access_log
    - Site Logs: /usr/local/apache/domlogs/sitename.com
  • Logins: /var/log/secure /var/log/logins_log
  • Messages: /var/log/messages
  • Cpanel: /usr/local/cpanel/logs/access_log


Other things to know:
Restart Cpanel in SSH (Shell is like a DOS prompt)#:
/etc/init.d/cpanel restart

Cpanel Manual Backup & Update - if backup doesn't work through WHM - SSH  command #:
/scripts/upcp

Apache Config Test in SSH: -test httpd.conf file for errors!
/usr/local/apache/bin/apachectl configtest

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) #
service httpd
service exim
service proftpd
service named
service mysql


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

Steven Leggett

  • Rating

    3/5

Related Articles

Comments (1)

  • Gravatar - Marc Cooper
    Marc Cooper 14:31, June 11, 2004
    Our Server names were all after the simpsons, but now our network is being redone and the others want to name the severs after the muppets!!!!
    can anyone thing of a better naming scheme??? HELP!

Add Your Thoughts

WebHostGear.com is a hosting directory, not a web host.

Copyright © 1998-2014 WebHostGear.com