Manually running /scripts/rebuildhttpdconf required?

tombarnsley

Registered
Oct 31, 2017
3
0
1
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
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,227
463
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.
 

tombarnsley

Registered
Oct 31, 2017
3
0
1
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

[email protected] [/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>.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,227
463
Hello,

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

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,227
463
Hi Tom,

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

Thank you.