jthomas

Active Member
Jul 31, 2006
27
0
151
I have 7 IP addresses on a new server that I bought which is running cent and cpanel/whm.

I set up the main server IP as the shared IP address

I then set up IP's 2 and 3 and the nameserver IP's.

ns1 and ns1 if you go to them through their IP addresses it gives the cpanel successfully installed message.

however after a site is added to the main shared IP, if anyone goes to the main server ip address, instead of getting the cpanel successfully installed message, they are directed to the site of the account that was added. am i doing something wrong in the set up? I hope i was able to explain this properly.

Thank You
 

LiNUxG0d

Well-Known Member
Jun 25, 2003
206
1
168
Gatineau, Quebec, Canada
Hi jthomas,

I've seen this happen quite a bit. This usually occurs because the default VHost for the server is missing from the httpd.conf file. When cPanel is setup, usually, the default IP (main shared) has a VHost setup, as the FIRST VHost in the httpd.conf. This is the default that's show when the IP is typed in.

Example, in my httpd.conf, the first VHost I see is...

Code:
<Location /server-status>
    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from localhost
</Location>

<Location /server-info>
    SetHandler server-info
    Order deny,allow
    Deny from all
    Allow from localhost
</Location>


# SUEXEC is supported

Include "/usr/local/apache/conf/includes/pre_virtualhost_global.conf"
Include "/usr/local/apache/conf/includes/pre_virtualhost_2.conf"

[B]# DO NOT EDIT. AUTOMATICALLY GENERATED
NameVirtualHost 1.2.3.4:80
NameVirtualHost *
# DO NOT EDIT. AUTOMATICALLY GENERATED

<VirtualHost 1.2.3.4:80>
    ServerName host.name.com
    DocumentRoot /usr/local/apache/htdocs
    ServerAdmin [email protected]
</VirtualHost>

# Default vhost for unbound IPs

<VirtualHost *>
    ServerName host.name.com
    DocumentRoot /usr/local/apache/htdocs
    ServerAdmin [email protected]
</VirtualHost>[/B]
Where 1.2.3.4 is my main shared IP.

Sometimes, I've seen this being pushed down in the config, or removed magically. I don't know why this occurs, but once it does, it will take the FIRST VHost in line and will display it as the default.

Try to add the above (it's in bold), if it's not there, and replace 1.2.3.4 with the default server IP (shared IP). When people access whatever that's unrouted, it'll go to that default cPanel page instead.

Hope this can help you, let me know if it doesn't.

Warmest regards,
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,608
77
308
cPanel Access Level
Root Administrator

DCH

Member
May 4, 2006
17
0
151
Threadjack!

Sorry for the threadjacking - but this is very closely related....

With the new system, I can't figure out how to change the default page that is seen when a user visits a specific IP via browser.

Example:
User goes to http://1.2.3.4/
They see the server's default html page.

I'd like IP 1.2.3.4 to resolve to the reseller's page that has control of the IP.
Previously, I could just manipulate the httpd.conf by moving around the vhost to the proper spot in the file to make this happen.

Now.... I don't have a clue how to change it via the includes....

Any help?