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.

Ip Change

Discussion in 'General Discussion' started by dragon2611, Sep 19, 2008.

  1. dragon2611

    dragon2611 Well-Known Member

    Joined:
    Nov 30, 2003
    Messages:
    126
    Likes Received:
    0
    Trophy Points:
    16
    Is It possible to change a sites IP via WHM but then also configure things so the site also responds on the original IP. (so the site doesn't appear down as DNS updates)
     
  2. FreedomBI

    FreedomBI Well-Known Member

    Joined:
    Jul 7, 2008
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    6
    I have done the following:

    First, create a file called includes/moved_domains.conf. Copy the host definition, including SSL if it has it and the NameVirtualHost line from httpd.conf to includes/moved_domains.conf. Then, at the bottom of httpd.conf, before the post-virtualhost includes, add

    Code:
    Include "/usr/local/apache/conf/includes/moved_domains.conf"
    
    I suggest also commenting the entry in moved_domains.conf with the date.

    The changes won't be recognized until apache is restarted, but it is not necessary to restart it now. When you change the site's IP, httpd.conf will be changed and apache will be restarted.

    When a couple days have passed, you can remove the entry from moved_domains.conf and restart apache.

    Also, don't forget that unless you edit the template for httpd.conf, any changes will be lost if you upgrade.
     
Loading...

Share This Page