Re: [users@httpd] Documentroot does not redirect...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx > 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
[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux