HolHost.com Blog Server administrators blog


Default Bandwidth Exceeded Page

In this tutorial you will learn how to modify the Cpanel bandwidth exceeded page. This page is shown for clients automatically when they run out of bandwidth. Bandwidth counts are reset every month.

Step 1: Login to the server as root in SSH.

Step 2: This will make a backup copy of the original file incase you need to revert back
cp /usr/local/cpanel/apache/mod_bwlimited.c /usr/local/cpanel/apache/mod_bwlimited.c.bak

Step 3: Then type:
pico -w /usr/local/cpanel/apache/mod_bwlimited.c

Scroll down until you reach the section where you'll see the HTML code for the bandwidth page or do a search for it in Pico #: Ctrl+W then paste this in: <HTML><HEAD>n<TITLE>509 Bandwidth Limit Exceeded</TITLE>

Change it to whatever you like... carefully.

Step 4: Save the file while still in pico #:
Crtl+X then Y



Default Index Page on hosting accounts

With this addon clients will have a default index.html page when they visit their new hosting account instead of a directory listing.

Useful information to put in this index.html page would include a link to your help desk, contact information, tutorial or any FAQ links you may have to help the client get started.

1. Create the Index Page
Take a few minutes and design a friendly html document that new visitors will see when they first get their hosting account setup. Once you're done creating the document, save it as index.html

2. Upload the Document
FTP to your server and upload the index.html file to the /cpanel3-skel/public_html directory

The reseller has a username, and the home directory is in: /home/username/ so the directory you want would be in: /home/username/cpanel3-skel/public_html  copy the index.html there.

3. Create a Test Account
Login to your WHM and create a temporary user account. Once the account is create then visit it and see if your index page shows up. If it doesn't ensure you copied it into the proper directory and check the above steps.


Setting up Nameservers in WHM

We'll show you  how to setup cpanel nameservers and configure them properly so you can run ns1 and ns2.yoursite.com

This guide will show you the ropes in how to setup cpanel nameservers and configure them properly so you can run ns1 and ns2.yoursite.com. Once your nameservers are setup clients can then use your own private nameservers for their domains.

1. Regiser your domain
Register the domain name you would like to use, you can register a domain here if you need one.This domain will be used as your nameservers - eg ns1.yourdomain.com and ns2.yourdomain.com

2. Additional IPs
Have 2 available IP addresses for your server that aren't in use.You will need to contact you provider to obtain these IP addreses.

3. Registering the Nameservers
Now login to your domain management page for the domain you registered and  register ns1.newdomain.com and ns2.newdomain.com as nameservers (registries normally have a special facility for doing that). The registry may also have a facility to propogate these nameservers around the foreign registries - if so, you should use this facility.

These registrations may take a few days to propagate (often as many as 3 days).

4. Reverse DNS
You may also need to get your data centre to enter a reverse DNS pointer for your nameservers. You'll need to let them know each nameserver and its IP address. Sometimes you can suffer non-delivery of mail if you don't so this. Reverse DNS pointers can take a while to propagate.
Setup a reverse on the IP address for your domain

5. Broken NDC/BIND
My version of WHM/CPanel came with a broken NDC. To fix this:

SSH into your box as root.

(a) Type: cd /scripts
(b) Type: ./updatenow
(c) Type: ./fixndc

Go back into WHM, go to the Restart Services section in the left menu and click DNS/Nameserver (BIND).

You will need to do this if you start getting 'ndc' errors when you are doing anything DNS related in WHM.

6. Setup Nameservers In WHM
Go into WHM (Web Host Manager) and select Edit Setup from the Server Setup menu on the left. Enter ns1.newdomain.com in the Primary Nameserver field. Hit 'Assign IP Address', then hit 'Add an A Entry for this nameserver'.
Repeat this process for the Secondary Nameserver field.

7. Tidy Up Junk Nameservers
Go into WHM (Web Host Manager) and select Manage Nameserver IPs from the Server Setup menu on the left. Remove any nameservers you don't recognise. This is just a tidy up exercise in case anyone's set anything up on the box before you.

8. Initial Nameserver Setup
Go into WHM (Web Host Manager) and select Initial NameServer Setup from the Server Setup menu on the left. Run this.

9. Restart BIND
Restart BIND (step 7 restarts BIND, but we've known it to need a proper stop and start for it to work) from SSH with:

service named stop
service named start

10. Manual Checks
I don't know what it is about this process, but it doesn't always work, so there are some things you can check manually via SSH.

Check that the nameservers are correctly specified on NS, NS2 etc.
EG: scroll to the name servers section.....
NS ns1.yournameserver.com
NS2 ns2.yournameserver.com

Check that there are nameserver entries for each IP. There may also be one for - this is okay. I'm led to believe (by the 'man' entry for resolv.conf) that this isn't a particularly important file, but I changed mine to read:

domain mybox.com
search mybox.com

Where 'mybox.com' is the main domain of my server, and '' and '' are the IP addresses of my primary and secondary nameservers.

resolv.conf is used to lookup names that are not in FQDN format.

Check that there are entries for each IP acting as a nameserver.


What is a domain name?

A domain name is a text form of a corresponding numeric I.P. address of a computer on the Internet. A domain name makes it easier for us humans to remember than the I.P. address which consists of four numbers separated by dots (periods). For instance, it is simpler to grasp and recall www.biotechdesk.com than the I.P. of the computer that hosts this web site.

A domain name also called the URL or a web address must be unique because it specifies the location of a web site on a particular computer. Domain names consist of a series of words separated by dots and can contain only alphabet, numbers and the hyphen. Characters like the underscore, exclamation mark, colon etc. are not allowed. Initially, domain names could only be fifteen characters long, however, now you can have up to 67 characters in a domain name.

The domain name information is stored on Name Servers. These systems not only store just the domain name and its corresponding I.P. address but also other details such as the registrant name, the contact information, registration date, expiry date etc.

Where to register domain names?

To be valid and usable on the web, domain names need to be registered. There are hundreds (if not thousands) of companies who will register a domain name for you. I booked my first domain through Network Solutions which is the first and still the most reputed domain name registrar. I had to shell out USD 35.000 per year for that domain name.

Now with intense competition, companies are now ready to offer domains for very low prices and even free if you purchase web hosting from them. The cost of domain names differ from company to company and also depend on the top-level domain (TDL). For example, at the time of writing, .co.in was a tad more expensive than the ubiquitous dot-com.

You can register a domain name in a few minutes but it will belong to you only after all name servers in the world have been updated which is usually to 24-72 hours (nowadays, the time has been cut short to 14-18 hours).

With the WHOIS service you can check the availability of a domain name. You can find this service on any reputed domain anmename registration company web site.

How to book a domain name

Do not be hasty when registering a domain name and I say this from experience! I mean look at the domain name of this site - www.webdevelopersnotes.com. I agree that the domain name describes the web site content accurately but will I book such a long name again? No Siree!

Unfortunately I cannot even think of changing this domain name because the web site has become quite popular and I'll lose most of my visitors and any advantage this site has on search engine rankings if I do so. Any way, in addition to the popular .com domain names, there are tens of others like .ws, .info, .name, .net, .biz, .cc, .tv, .mobi etc. There are also country specific domain names like .co.uk, .co.in, .me.uk, .in, .jp, .de...
Which domain is the best for you depends on the kind of web site you plan to develop.

Where to register domain names?

Register a domain name


What is webmail and do I need it?

Webmail is a way to access your email account. It is totally web based and hence the name webmail. You do not need specialized software on your system to use webmail. In fact you don't need to work from a specific computer to access emails through webmail.

The very concept of webmail is to provide access to your email accounts from any computer anywhere in the world (as long as it has a net connection). Webmail provides a web based interface for you to manage your email accounts and you don't need to configure any software since everything is online!

Most web hosting companies allow you to access your email accounts using webmail. It is very simple to use, very similar to working on popular free email accounts such as Hotmail, Yahoo! or Gmail.

Webmail software

All your emails reside on the hard disk of the hosting server usually in a separate directory. Webmail software provide you an easy-to-use interface to read, write, delete and manage email messages. Webmail software is usually a suite of programs or scripts written in a server-side language that lets you gain access to an email account and perform routine tasks.

On Linux and Unix web servers, the webmail software scripts are usually written in Perl, Python or PHP and some of the popular ones are Horde, SquirrelMail, NeoMail and RoundCube. These webmail software can also be used on the Windows operating system as long as there is support for that server-side language. For instance, if PHP has been configured properly on a Windows server, any PHP based webmail software can be installed and run successfully.

How important is it for your web hosting service to provide webmail?

As I mentioned above, webmail allows you to administer your email accounts from any computer. And this makes webmail is a very important application to have on your web hosting package. Trust me, I say this from experience. There may come an occasion when you need to read and/or reply to important email messages and you don't have access to your system. Webmail comes to your rescue at times like these. You can simply log in at your email accounts from any computer (as long as it is connected to the Internet)
How do I access my emails with Webmail?

Your web hosting service should provide you the URL for webmail.

It would typically be http://www.your-domain-name.com/webmail.

When you load the webmail URL in a web browser (such as Internet Explorer or FireFox) will now be asked the user name and password of the email account. Enter these log-in details and on success, you will be granted access to your email account.