httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Owen Boyle <...@bourse.ch>
Subject Re: Virtual host, again and again
Date Thu, 14 Feb 2002 08:57:16 GMT
Patrick Atlas wrote:
> 
> Hello,
> 
> Something wrong about my Vhost configuration.

You're telling me...

> The Vhost.conf:
> 
> <NameVirtualHost *>

This is a Directive - it doesn't go in <>'s. It might work, but why try
something that's not necessary and not documented?

> 
> <VirtualHost *>
> ServerName www.domain.com
> DocumentRoot /home/www/html
> </VirtualHost>
> 
> <VirtualHost *>
> ServerName subdomain.domain.com
> User sympa
> Group sympa
> DocumentRoot /home/www/cgi-bin/script.cgi  (can I point to a script or must
> I only write the folder name, assuming that the default name would be the
> mailing-list script in a dedicated folder?)

DocumentRoot takes a directory as argument. Also, it won't magically
pick out a default file from the docroot, even if it's the only one
there...

Don't you have any static content in this VH at all? If not, at least
set DocumentRoot to an empty directory - I've never tried running a VH
with no DocRoot and can't be bothered experimenting.

If you want to define a cgi script as the default action in your
VirtualHost, use "DirectoryIndex".

In summary, something like this should do what you want:

DocumentRoot	/home/www/empty-dir
ScriptAlias	/cgi-bin	/home/www/cgi-bin
DirectoryIndex	/cgi-bin/script.cgi

Read the docs for these directives for more info...

Rgds,

Owen Boyle.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message