Hi All,
I did try to find within cpanel forum and google for a solution, but nothing satisfactory i found. Lots of old posts about the pre 11.40 version.
We are running cPanel for a while, which was running fine. Yesterday we needed to resize the root partition on our AWS-EC2 instance. After rebooting we got a new internal IP (10.x.x.x). Because the IP changed, all websites went to default web page (i'm sure this something familiar). I quickly fixed the 'default page' problem by replacing the old ip address with the new one in /etc/httpd/conf/httpd.conf. So for the moment it works, but i know you should not make changes to this file directly.
Since 11.40 there is NAT support, however we installed our server before 11.40.
I want to use the NAT functionality (currently we run WHM 11.42.1 (build 12)).
I Tried:
The NAT is shown correctly on the 'Show or Delete Current IP Addresses'. But when I restart httpd, i'm back to the default pages for all websites
Then there are a bunch of files that still have the old 10.x.x.x IP.
So my question is whats the correct way to reconfigure a existing cPanel installation to use NAT?
There also a bunch of files that still contains the old IP (10.x.x.x)
Do i need to replace the old ip in all these files by hand? Or is there a script that can fix this?
Many thanks!
I did try to find within cpanel forum and google for a solution, but nothing satisfactory i found. Lots of old posts about the pre 11.40 version.
We are running cPanel for a while, which was running fine. Yesterday we needed to resize the root partition on our AWS-EC2 instance. After rebooting we got a new internal IP (10.x.x.x). Because the IP changed, all websites went to default web page (i'm sure this something familiar). I quickly fixed the 'default page' problem by replacing the old ip address with the new one in /etc/httpd/conf/httpd.conf. So for the moment it works, but i know you should not make changes to this file directly.
Since 11.40 there is NAT support, however we installed our server before 11.40.
I want to use the NAT functionality (currently we run WHM 11.42.1 (build 12)).
I Tried:
- /scripts/build_cpnat
- /scripts/rebuildhttpdconf
The NAT is shown correctly on the 'Show or Delete Current IP Addresses'. But when I restart httpd, i'm back to the default pages for all websites
Then there are a bunch of files that still have the old 10.x.x.x IP.
So my question is whats the correct way to reconfigure a existing cPanel installation to use NAT?
There also a bunch of files that still contains the old IP (10.x.x.x)
- /etc/*
- /var/cpanel/userdata/*/*
Do i need to replace the old ip in all these files by hand? Or is there a script that can fix this?
Many thanks!