Change IP for certain add-on domain

yoachan

Well-Known Member
Jan 10, 2010
65
0
56
Dear all,

I have a machie that has two ips. Let's just call it 128.1.1.1 (default) and 128.1.1.2.
For a reason I'd like to change ip for an/several add-on domain from 128.1.1.1 to 128.1.1.2, just some domains.
My question is, how can I change my domain (let's just call it 'domain.com') to another ip in the same machine.

If I can manually change the httpd.conf file, I'll be gladly edit it to add
Code:
    Listen 128.1.1.2:80
and change vhost for domain.com to
Code:
    <VirtualHost 128.1.1.2:80>
But using WHM/CPanel, I'm not sure.
I had added "Listen 128.1.1.2:80" to to "Pre Main Include" in the "Include Editor" so that apache will also listen to 128.1.1.2.

Now apache will also listen to 128.1.1.2. My problem is my domain will still only listen to 128.1.1.1 from the virtual host section. If only I can change <VirtualHost 128.1.1.1:80> to <VirtualHost 128.1.1.1:80> for my domain.com, I'll be done with it.

Anyone has any solution(s)?
Thanks in advanced. :)

Regards,

Yoachan
 

quietFinn

Well-Known Member
Feb 4, 2006
1,222
87
178
Finland
cPanel Access Level
Root Administrator
You change site's IP address in WHM-> Account Functions-> Change Site’s IP Address
 

yoachan

Well-Known Member
Jan 10, 2010
65
0
56
Yay! Thank you all!

You change site's IP address in WHM-> Account Functions-> Change Site’s IP Address
Thank you for your reply.

To change a domain with an add-on domain(s), this function won't do for it will change ip for whole domains in an account.
CMIIW
But your solution is the fastest and easiest way to change site's ip in an account. It's a new knowledge for me.
Thanks :)

Hello :)

Yes, it's possible to assign a dedicated IP address to a subdomain or an addon domain name. This is documented at:

Assigning Dedicated IPs to Subdomains

Thank you.
I followed your link, and yes it works.
Thanks :)