You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by John Hascall <jo...@iastate.edu> on 1999/02/09 19:10:03 UTC

Re: general/3865: ScriptAlias gives CGI a bogus SCRIPT_NAME env var

The following reply was made to PR general/3865; it has been noted by GNATS.

From: John Hascall <jo...@iastate.edu>
To: marc@apache.org
Cc: apbugs@apache.org
Subject: Re: general/3865: ScriptAlias gives CGI a bogus SCRIPT_NAME env var 
Date: Tue, 09 Feb 1999 12:02:38 CST

 > Synopsis: ScriptAlias gives CGI a bogus SCRIPT_NAME env var
 > 
 > State-Changed-From-To: open-feedback
 > State-Changed-By: marc
 > State-Changed-When: Tue Feb  9 09:47:08 PST 1999
 > State-Changed-Why:
 > Erm... I'm not sure I understand what you are trying to say.
 > You say:
 > 
 > >given: ScriptAlias /env/ /var/www/cgi-bin/envshow/catalog/
 > >the CGI script gets SCRIPT_NAME=/env
 > >where under NCSA (which we are converting from)
 > >the CGI script gets SCRIPT_NAME=/cgi-bin/envshow
 > >(which I would argue is correct)
 > 
 > Why should /cgi-bin/envshow be in there at all?  There is no
 > URL with that name based on your ScriptAlias directive.
 > If you have some other directive that makes such a URL valid,
 > fine, but there is no reason Apache should randomly pick
 > some other path to use...
 
     Why?  It was my understanding that Apache was 'compatible'
     with the old NCSA server -- and that's what it does.
 
     the ScriptAlias causes the translation:
 
      /env/<whatever>   -=>  /var/www/cgi-bin/envshow/catalog/<whatever>
 
     then it (NCSA) separates that into:
 
          /var/www    /cgi-bin/envshow  /catalog/<whatever>
          <docroot>   SCRIPT_NAME       PATH_INFO
 
     possibly because of <Directory "/var/www/cgi-bin"> ...
 
 John