The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Change IP for certain add-on domain

Discussion in 'General Discussion' started by yoachan, Jul 17, 2013.

  1. yoachan

    yoachan Well-Known Member

    Joined:
    Jan 10, 2010
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    6
    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
     
  2. quietFinn

    quietFinn Well-Known Member

    Joined:
    Feb 4, 2006
    Messages:
    998
    Likes Received:
    10
    Trophy Points:
    18
    Location:
    Finland
    cPanel Access Level:
    Root Administrator
    You change site's IP address in WHM-> Account Functions-> Change Site’s IP Address
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,811
    Likes Received:
    671
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  4. yoachan

    yoachan Well-Known Member

    Joined:
    Jan 10, 2010
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    6
    Yay! Thank you all!

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

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

Share This Page