httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Owen Boyle <...@bourse.ch>
Subject Re: Q. on the "/" in ScriptAlias.
Date Wed, 20 Mar 2002 13:31:51 GMT
infotechsys wrote:
> 
> Hi,
> 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...

Rgds,

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: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