[thelist] Virtual Hosts on Apache

Daniel J. Cody djc at starkmedia.com
Sat Aug 18 17:48:35 CDT 2001


Travis -

Your config looks ok actually.. The fact that you're getting a 404 is 
actually a good sign and suggests that the vhosts are set up correctly.

Do you have a directoryindex file(index.html or index.php) in the 
directories? if not, add one in each of the documentroots and try it 
again, checking your error_log's if it doesnt work out..

Lemme know how it goes :)

.djc.

travis forden wrote:
> Please also reply to my address as I'm on digest.
> 
> My apache/php/perl/mysql combo [apache 1.3.14, php 4.0.5, mysql 3.23.32, perl 5.005_03] on win98 is for development only. It's
> all installed in "D:/apache/" (installed with PHPTraid). The webs are at "D:/www/".
> 
> I want to set up virtual hosts whereby each web is accessed if i type in http://domain1/ (which points to D:/www/domain1), http://domain2/ (points to D:/www/domain2), etc.
> 
> I set up the following.
> 
> NameVirtualHost 127.0.0.1
> 
> <VirtualHost 127.0.0.1>
>     ServerAdmin webmaster at domain1
>     DocumentRoot "D:/www/domain1/"
>     ServerName domain1
>     ErrorLog logs/domain1-error_log
>     CustomLog logs/domain1-access_log common
> </VirtualHost>
> 
> <VirtualHost 127.0.0.1>
>     ServerAdmin webmaster at domain2
>     DocumentRoot "D:/www/domain2/"
>     ServerName domain2
>     ErrorLog logs/domain2-error_log
>     CustomLog logs/domain2-access_log common
> </VirtualHost>
> 
> However, when I point to http://domain1, i get 404 error. same with http://domain2.
> 
> How do I, in effect, create internal webs that point to each web?






More information about the thelist mailing list