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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

virtual host problem

Status
Not open for further replies.

benp07

Technical User
Aug 31, 2001
87
US
i am running apache with php on freebsd stable
i have about 5 site running on it

<VirtualHost DocumentRoot /usr/local/ ServerName </VirtualHost>

this is the first virtual host in the http.conf file and from a web browers i can get to the site with or
and 2-5
<VirtualHost DocumentRoot /usr/local/ ServerName </VirtualHost>

when i type in every thing is ok but when i type in it will take me to the site for i tried to do this for each site

<VirtualHost domain1.com>
DocumentRoot /usr/local/ ServerName domain1.com
</VirtualHost>

but nothing happened i have checked all the dns to

thanks alot for any help
Ben
 
Hi mate,

Beside each of the ServerName add ServerAlias so that you get something like the following:

<VirtualHost domain1.com>
DocumentRoot /usr/local/ ServerName domain1.com
ServerAlias *.domain1.com
</VirtualHost>


This would match any subdomain of that site.

Hope this helps Wullie


The pessimist complains about the wind. The optimist expects it to change.
The leader adjusts the sails. - John Maxwell
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top