httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From infotechsys <>
Subject Re: Q. on the "/" in ScriptAlias.
Date Wed, 20 Mar 2002 17:55:43 GMT
Tahnks for the advice, this worked.

Owen Boyle wrote:

>infotechsys wrote:
>>The documentation that I've so far does not make
>>it clear whether the "/" at the end of the path
>>implies that subdirectories will be search for the
>>cgi script. For example, if I put the directive
>>ScriptAlias /mydir/  "/usr/local/www/mydir/".
>>does this mean that all subdirectories will
>>be search under "mydir"?
>There are two things going on here:
>(1) The ScriptAlias directive declares a directory - and all its
>subdirectories - as containing CGI scripts. This means that any file
>under the root CGI directory will be treated as a CGI and that apache
>will try to execute it.
>(2) In the URL, you must specify the complete path to the script you
>want to execute - apache will not search down through the directory
>structure looking for it.
>So if you have:
>	ScriptAlias /cgi  /usr/local/www/mycgi
>and you have a script at
>	/usr/local/www/mycgi/dir1/dir2/prog.cgi
>this script will be declared as a CGI, but you must type:
>	http://server-name/cgi/dir1/dir2/prog.cgi
>to execute it.
>i.e. http://server-name/cgi/prog.cgi won't work...
>Owen Boyle.
>PS it is conventional to call a cgi directory "cgi" or "cgi-bin" -
>"mydir" is a bit funny-looking...
>The official User-To-User support forum of the Apache HTTP Server Project.
>See <URL:> for more info.
>To unsubscribe, e-mail:
>For additional commands, e-mail:

View raw message