HostOnNet Blog

CPanel Server Shared IP and Default Page

In Cpanel server, if you access the main shared IP in browser, you will see default Cpanel Page.
 
If you change the main shared IP to a new one and host a web site with that IP, you will find the first web site you hosted on the shared IP when you visit the IP. For a shared web hosting this is not good as the IP host many web sites and if a client access his IP on browser, he will see another web site, its better to show default cpanel page that says “There is no website configured at this address.”
 
To do this, you have to edit httpd.conf file.
 
# vi /usr/local/apache/conf/httpd.conf
 
In the find find first real (you will see first entry commented, find next entry) entry of
 
NameVirtualHost
 
This will look like
 
NameVirtualHost 69.72.153.17:80
 

BytesLog domlogs/host.yourdomain.com-bytes_log
ServerName host.yourdomain.com
DocumentRoot /usr/local/apache/htdocs
 
If you have two other shared IP and need to make them show cpanel default page, you have to do following
 
 
NameVirtualHost 22.77.28.99:80
 

DocumentRoot /usr/local/apache/htdocs
 
NameVirtualHost 22.77.28.100:80
 

DocumentRoot /usr/local/apache/htdocs
Now this will be the first virtual host, so when you access the site, it will show these virtual hosts, which points (DocumentRoot) to default cpanel page.

Posted in Uncategorized. Bookmark the permalink.