oah

Well-Known Member
Jan 23, 2018
51
9
8
Iraq
cPanel Access Level
Website Owner
HI
I have an aws EC2 machine (running cloud-linux) with WHM installed on it, an elastic IP is attached to the machine as well.
Daily snap-shot is created for the machine, my machine crashed today so I decided to boot-up the snap-shot, so I:

1- Created an Image from the snapshot and launched it (launch it in a new EC2 instance)
2- De-attached the Elastic IP from the original instance.
3- Attached the elastic IP to the new instance.
4- Powered up the new instance

Note: although I was able to transfer the elastic IP (public IP) between the machines, however each machines has a different private IP address.

Observations:
1- I was able to access the WHM no the new machine.
2- All my data was there.
3- The webserver wasn't working !!!
4- I tried to host basic HTML pages but I was getting the error 404 page.
5- I am guessing this has to do with the Imaging being taken with the private IP address of the old server and the new machine having a different private IP address.


By the way I tried to create new domains (test domains) on the new machine, but I was getting an error saying "this user is already created" which is not the case. I even tried to create subdomains like test123, test1234, and I was getting the same message every time.

The website also kept throwing:

"SORRY PAGE and redirected to cgi-sys/defaultwebpage.cgi"

Any ideas on how to solve this issue?

image (2).png
 
Last edited:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,216
463
Hello @oah,

Can you use WHM >> IP Migration Wizard to migrate the server from the old local IP address to the new local IP address?

Let me know if that helps.

Thank you.
 

oah

Well-Known Member
Jan 23, 2018
51
9
8
Iraq
cPanel Access Level
Website Owner
Hello @oah,

Can you use WHM >> IP Migration Wizard to migrate the server from the old local IP address to the new local IP address?

Let me know if that helps.

Thank you.
@cPanelMichael does the IP migration wizard change the local or public IP, I mean lets say my server is behind a nat and the public IP is still the same but my local IP has changed, should I still do the IP migration wizard?

Just a quick question where is exactly the "private IP" is used inside the WHM, is it compiled with the virtual hosts?
I am asking out of curiosity.

Thx.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,216
463
Hello @oah,

You'll want to ensure 1:1 NAT is configured on your server if you're using an internal IP address. We document how to do this, and where the NAT settings are stored at:

1:1 NAT - Version 76 Documentation - cPanel Documentation

When you are using 1:1 NAT, you generally set the local private IP address as the default shared IP address in "WHM >> Basic WebHost Manager® Setup".

You can enter the old private IP address in WHM >> IP Migration Wizard and it will replace it with the new private IP address wherever the old IP address is utilized.

Thank you.