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 Fri, 15 Feb 2002 08:35:14 GMT
Patrick Atlas wrote:
> 
> Of course. I don't need the second virtualhost. And there is a first host.
> 
> > If you want to define a cgi script as the default action in your
> > VirtualHost, use "DirectoryIndex".
> 
> The DirectoryIndex is set.
> 
> > 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...
> 
> The docs are read and read again...
> Here is the problem:
> 
> I need to run a host under a sympa/sympa user/group, as the main host is
> running under apache/apache user/group.
> 
> I need also a cgi-bin folder to run some scripts under the sympa/sympa
> user/group.
> 
> I create a single folder with the option ExecCGI.
> I set the user and group as "sympa" in the VirtualHost directives.
> 
> But when I launch the http://subdomain.domain.com/script.cgi I get a
> FORBIDDEN page... There is no .htaccess.
> Is there something wrong with the user and group attribution of the folder
> or the scripts?

Nothing to do with that - it's to do with how you expect apache to
resolve the paths to your files and scripts.

Are you using ScriptAlias or AddHandler to define CGIs? ScritpAlias
defines a whole dir as CGI, AddHandler defines a type of extension
site-wide. (NB Options ExecCGI just allows CGIs to run, it doesn't
*cause* them to run - subtle difference).

Anyway, I would recommend something like this:

<VH defn.>
  ServerName subdomain.domain.com
  AddHandler cgi-script cgi
  DocumentRoot /path/to/dir/containing_script.cgi

As always, look in the error_log to see what apache is actually trying
to do and why it fails. The server messages are intentionally vague for
security reasons.

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