httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Owen Boyle <>
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


this script will be declared as a CGI, but you must type:


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