You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by si...@us.ibm.com on 2000/07/18 20:50:14 UTC

VirtualScriptAlias question

The ScriptAlias directive permits via a parameter the specification of the
target directory where the cgi program resides, the VirtualScript Alias
directive does not have this option. The code in mod_vhost_alias.c enforces
that the target directory for the cgi programs must be "cgi-bin" or it
maybe the root directory. The following is a code extraction from
(src/modules/standard/) mod_vhost_alias.c that enforces this rule:

    if (!strncmp(r->uri, "/cgi-bin/", 9)) {
     mode = conf->cgi_root_mode;
     map = conf->cgi_root;
     uri = r->uri + 8;
     /*
      * can't force cgi immediately because we might not handle this
      * call if the mode is wrong
      */
     cgi = 1;
    }
    else if (r->uri[0] == '/') {
     mode = conf->doc_root_mode;
     map = conf->doc_root;
     uri = r->uri;
     cgi = 0;
    }

  In the strictest sense this not is a problem. The question is why is this
a rule for the VirtualScriptAlias directive and not for ScriptAlias
directive?

Thanks.

Rob Simonson
simo@us.ibm.com



Re: VirtualScriptAlias question

Posted by Tony Finch <do...@dotat.at>.
simo@us.ibm.com wrote:
>
>  In the strictest sense this not is a problem. The question is why is this
>a rule for the VirtualScriptAlias directive and not for ScriptAlias
>directive?

Because I am lazy. In the context for which the code was written all CGI
directories were called cgi-bin, and I didn't generalize it because (as
you say) the lack of generality isn't in the strictest sense a problem.

Tony.
-- 
f.a.n.finch    fanf@covalent.net    dot@dotat.at
292 hatchet-job afterglow