httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Victor Trac" <victor.t...@gmail.com>
Subject Re: [users@httpd] Documentroot does not redirect...
Date Thu, 13 Apr 2006 15:22:38 GMT
For name based hosting you have to define at least one IP and port using
NameVirtualHost.  So change NameVirtualHost *:80 to NameVirtualHost IP:80
and then you have to use <VirtualHost IP:Port> for every VirtualHost
container.  Otherwise the <VirtualHost *> or <VirtualHost *:80> will result
in the first Virtual Host to be served by Apache.  So what you want is
something like:

NameVirtualHost 123.123.123.123:80

<VirtualHost 123.123.123.123:80>
ServerName www.afrilibtest.net
DocumentRoot /var/www/html/
ErrorLog /var/rubyapps/testapp/log/apache.log
</VirtualHost>


<Virtualhost 123.123.123.123:80>
 ServerName www.testsite.org
 DocumentRoot /var/www/html/testsite
</VirtualHost>

Doing this will also allow you to properly mix and match IP and named-based
virtualhosts.

Cheers,
Victor

On 4/13/06, Axel-St├ęphane SMORGRAV <Axel-Stephane.SMORGRAV@europe.adp.com>
wrote:
>
> The following may qualify as a minimum configuration... Have not tested
> it, though. I assumed you were using worker MPM.
>
> In the config below, I believe the virtual host <VirtualHost *> can
> explain your problem. See it has DocumentRoot /var/www/html ??? I believe
> you meant this virtual host directive to read <VirtualHost *:80
>
> Problem solved.
>
> -ascs
>
>
>
>


--
http://www.victortrac.com
Mime
View raw message