Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to get rid of test page

Status
Not open for further replies.

samsin1

Programmer
Joined
Aug 18, 2004
Messages
1
Location
US
i have a new server and a couple of my sites bring up the apache test page instead of the index page. i have uploaded all my files to the root folder and have stopped and restarted apache 2 a number of times. does anyone know how to get rid of the test page? thanks.
 
You said a couple of your sites bring up the test page. Does that mean your are using virtual hosts?. If you have more than one site and only one public ip, you'll need to use name based addressing. All sites will need to have their own vhost container, including your "main" site. The server in the main section will not work anymore. If it is still serving the index from the DocumentRoot defined in the "main" section, then the virtual hosts are not setup correctly. Here are a few thing to check:

ServerName localhost #Set to localhost, machine name or commented out

Listen 192.168.1.20:80 #Will listen only for this address on port 80

UseCanonicalName Off #Set this to Off

NameVirtualHost * #Use name based addressing

<VirtualHost *>

ServerName mydomain.com #Each vhost MUST have this
ServerAlias DocumentRoot "/path/to/index.html/" # You MUST also have this
Your directives and directory containers also go here

</VirtualHost>

I think somebody already wrote an FAQ on how to setup virtual hosting so you may want to take a peak there for more info.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top