Default Web Page

Default Web Page

Post by Dan Harri » Wed, 18 Aug 1999 04:00:00



I am running Apache 1.3 on a Red Hat Linux box.  We are using virtual
domains.  My problem is in setting the default document directory, or more
spesficaly the directory that is displayed when none of the virtual domains
are found.

I tried:

<VirtualHost _Default_:*>
    documentRoot /etc/fu/bar
</VirtualHost>

This has no effect.  The server displays the first Virtual Host in my list.
Why?

Dan Harris

 
 
 

Default Web Page

Post by John Imri » Wed, 18 Aug 1999 04:00:00


Quote:

> <VirtualHost _Default_:*>
>     documentRoot /etc/fu/bar
> </VirtualHost>

> This has no effect.  The server displays the first Virtual Host in my list.
> Why?

> Dan Harris

Try putting the DocumentRoot directive outside of any VirtualHost  directives

The Pilgrim

 
 
 

Default Web Page

Post by Joshua Sliv » Wed, 18 Aug 1999 04:00:00



> I am running Apache 1.3 on a Red Hat Linux box.  We are using virtual
> domains.  My problem is in setting the default document directory, or more
> spesficaly the directory that is displayed when none of the virtual domains
> are found.
> I tried:
> <VirtualHost _Default_:*>
>     documentRoot /etc/fu/bar
> </VirtualHost>
> This has no effect.  The server displays the first Virtual Host in my list.
> Why?

If you are using name virtual hosts, then the "default" virtual host is
the first listed virtual host.  Any non-matching request will be served
by the first vhost listed in your configs.

--
Joshua Slive

http://finance.commerce.ubc.ca/~slive/