IP pointing to the wrong directory

Jonas

Registered
May 15, 2002
3
0
301
my server with cPanel has a giant problem. I asked my registrar to point http://cpanel.hyper-dns.net/ to http://66.28.166.106 but when I click on it I get the correct page on the cpanel. but not on the IP what gives me some namebased site which is on the server.
Any tips?
 

Marty

Well-Known Member
Oct 10, 2001
629
1
318
Is that namebased site on the same ip number? If so, then it is doing exactly what it should do. With namebased hosting, surfing to an ip number will pull up the first sight listed in the virtual host section of the httpd conf file that is using that ip. You could move the virtual host entry for the site you want to come up on that ip to the top of the virtual host directory to get the behaviour that you want.
 

Jonas

Registered
May 15, 2002
3
0
301
So I should create a virtual host in httpd.conf that points to the apache htdocs (the main) correct me if I am wrong
 

iggy

Member
Feb 20, 2002
24
0
301
You are correct. Make sure it is the first virtual host entry for the main IP in httpd.conf