Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

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.

Manually running /scripts/rebuildhttpdconf required?

Discussion in 'General Discussion' started by tombarnsley, Oct 31, 2017.

  1. tombarnsley

    tombarnsley Registered

    Joined:
    Oct 31, 2017
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Birmingham
    cPanel Access Level:
    Root Administrator
    Hi guys,

    Recently we moved our server to a different external IP address as we changed datacentres.
    The server is on CentOS6.

    I didnt move the server so I couldnt really comment on what was done at the time.

    The issue I have is that new sites dont appear to bind to the IP address even though they claim to be when you try to reapply the IP address. What I have to do is add a generic IP address to the server move the site to that IP address and then move it back. After this I rebuild httpd conf and it all works fine.

    We never had to do this before and Google seems to draw a blank.

    I thing the issue may be that the server is using 1:1 NAT and somewhere in the IP address change something has been missed.

    Has anyone else had this issue?

    Tom
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    42,782
    Likes Received:
    1,712
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    With NAT mode, try using "WHM >> IP Migration Wizard" to migrate to the new local IP address. Also, check to ensure the correct IP addresses are configured in the /var/cpanel/cpnat file.

    Thank you.
     
  3. tombarnsley

    tombarnsley Registered

    Joined:
    Oct 31, 2017
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Birmingham
    cPanel Access Level:
    Root Administrator
    Hi Michael,

    The migration was many months ago and I believe that was what was done.

    The cpnat file is correct and can be modified from WHM

    root@cpanel-01 [/scripts]# cat /var/cpanel/cpnat
    192.168.151.54 <external public IP>

    Interestingly I have to add a dummy IP address change the IP address of the site to that address and change it back. That in fact is what solves the issue.

    Here is the output of that procedure.

    Changing ip for user.co.uk (user) to 192.168.0.1
    Setting up for ip change..... Done
    The remote dns zone is not consistent with the httpd.conf.
    The current ip in httpd.conf is: 192.168.151.54.
    The current ip in the dns zone is: <external IP address>!
    <external IP address> will be switched to the new ip as well!
    Changed all instances of <external IP address> -> [192.168.0.1] in user.co.uk
    Updating httpd.conf....Done
    System has 1 free ip.


    Account modified. New ip is: 192.168.0.1.
    Changing ip for user.co.uk (user) to <external IP address>
    Setting up for ip change..... Done
    Changed all instances of [192.168.0.1] -> [<external IP address>] in user.co.uk
    Updating httpd.conf....Done
    System has 1 free ip.
    Account modified. New ip is: <external IP address>.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    42,782
    Likes Received:
    1,712
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Feel free to open a support ticket using the link in my signature and we can take a closer look.

    Thank you.
     
  5. tombarnsley

    tombarnsley Registered

    Joined:
    Oct 31, 2017
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Birmingham
    cPanel Access Level:
    Root Administrator
    Hi Michael,

    This is chargeable isnt it?

    Tom
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    42,782
    Likes Received:
    1,712
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hi Tom,

    Support tickets are free of charge. There's only a cost if you choose to purchase priority status.

    Thank you.
     
Loading...

Share This Page