ipaddress changed after fresh installation

RisenAngel

Well-Known Member
Mar 9, 2011
104
0
66
Killeen, Texas
I recently just completed a fresh install of cpanel/whm. The next day my ip address changed so I had to make those changes to centos6.5. Today I went to the ip address and I got the default website page.

Is there a way to fix this or should I just reinstall cpanel?
 

vanessa

Well-Known Member
PartnerNOC
Sep 26, 2006
833
28
178
Virginia Beach, VA
cPanel Access Level
DataCenter Provider
Can you clarify what is happening? When you say "the ip address changed", are you talking about the IP address of the server?


I'm reading this as "I want to be able to access my website from its IP in my browser". If that is the case: If you go to the main IP address of a server, you are typically always going to get the default website page. The shared IP is, by default, loading from /usr/local/apache/htdocs. If you go to a website configured on that IP, by its domain name, it will show up. If you want the main IP to load from a different location so you can access the site by IP address, you can do so as follows:

Code:
cd /var/cpanel/templates/apache2
cp main.default main.local
Then change the default docroot to the docroot of your website and rebuild the config.

Code:
/scripts/rebuildhttpdconf
service httpd restart
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,216
463
Hello :)

Yes, as Vanessa mentioned, it's normal to see the default website page when opening the IP address directly in your browser. You can make the changes specified in the previous post if you want to see a specific website load instead.

Thank you.
 

RisenAngel

Well-Known Member
Mar 9, 2011
104
0
66
Killeen, Texas
Thank you for the responses. Since I'm behind a NAT I had to remap a public ipaddress and then assign the internal ip to eth0. Now to try moving an account from enkompass to cpanel to see how it works.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,216
463
I am happy to see you were able to resolve the issue. Thank you for updating us with the outcome.