Portal Home > Knowledgebase > Articles Database > How to Setup Multiple IPs with Single Domain on CPANEL/CentOS Server
How to Setup Multiple IPs with Single Domain on CPANEL/CentOS Server
Posted by Asiff, 03-05-2012, 10:44 AM |
I have a WHM/Cpanel server (CENT OS).
I want to change my Primary Domain IP address, but the problem is that when it Change IP for my Domain (via WHM), than those Visitors where the DNS has not Refreshed shows DEFAULT PAGE.
Lets suppose:
Domain = www.mydomain.com goes to IP: 202.202.202.1
So in Cpanel its like http://202.202.202.1/~mydomain to access my Domain.
But i want my site to be accessible from my NEW IP: 202.202.202.2 as well.
e.g. http://202.202.202.2/~mydomain
In short, both IP's will open that Domain name.
Does anyone have any idea how to do it exactly (considering i am noob).
|
Posted by shakybaky, 03-06-2012, 12:41 AM |
first off, why would you do that? I see the reasons behind pointing multiple domain names to the same ip, but not multiple ips to the same domain.
My guess would be to setup a new user with that ip address in virtual hosts, then symlink back to the original ips directory. I dont use whm/cpanel so I couldnt tell you how to do that there.
|
Posted by rockgeeks, 03-06-2012, 12:43 AM |
Well, Please check the following documentation for your more help....
http://docs.cpanel.net/twiki/bin/vie...s/ChangeSiteIP
|
Posted by Hostify Networks, 03-06-2012, 02:17 AM |
You can do this by modifying httpd.conf manually. See the "Serving the same content on different IP addresses" section in the Apache docs for more information: http://httpd.apache.org/docs/2.0/vhosts/examples.html
Basically, just add the second address to the appropriate virtualhost(s). Assuming you're familiar with SSH, all you'd do is
and then add the IP address to the virtualhost of your domain(s):
save the configuration and then restart Apache.
NOTE: make a backup of the Apache configuration before making modifications.
|
Posted by Asiff, 03-06-2012, 12:51 PM |
Thanks 'Hostify Networks' it worked.
Did created a Duplicate entry for the domain in Virtual Hosts (replaced the IP).
Did added the A ENTRY into domain DNS, and did the trick
Thanks once again for the tip.
|
Add to Favourites Print this Article
Also Read