How do you determine what page is displayed; server_.domain.com?

Izkabola

Well-Known Member
Aug 5, 2003
58
0
156
I have server1.domain.com and when that is viewed, a clients website comes up. I don't want that to happen. I noticed that the clients website is first in the httpd.conf file. How can I go about changeing the page that is displayed there?

Thanks in advanced!
 

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,441
31
473
Go on, have a guess
You've practically answered it yourself. You need to place the first site for any given IP address to be first in the list of virtualhost containers to show up so that any HTTP 1.0 connections go to that site of your choosing, rather than the one that just happened to be there.
 

Sinewy

Well-Known Member
May 15, 2004
364
1
168
Sydney, Australia
cPanel Access Level
DataCenter Provider
Find this section in /usr/local/apache/conf/httpd.conf

<Location /whm-server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Location>

Now above that section add this:

<VirtualHost main.server.ip>
BytesLog domlogs/hostname.here-bytes_log
ServerName hostname.here
DocumentRoot /usr/local/apache/htdocs
</VirtualHost>

then:

/scripts/restartsrv httpd

the above will show the green cPanel no website configured page when you go to http://mainip/