CGI suggestion

ts (decoux@moulon.inra.fr)
Tue, 28 Dec 93 17:12:17 +0100


> This is something that was not clear to me from reading the spec. I
> did not realize that the name "cgi-bin" was in any way special. Is,
> in fact, "cgi-bin" going to be a reserved word in http URL's? If so
> then my objection about parsing is not well founded. This is easy
> enough to parse -- it will still confuse some people though. It also
> seems like a rather artificial restriction. Am I correct in my
> understanding that this means that any subdirectory of cgi-bin is
> inaccessible to a client querying the server?
>
> Could we clarify the CGI spec some more?
>
> 1. Is "cgi-bin" a reserved directory name?
> 2. Can it be anyplace in the directory hierarchy?
> 3. Can a server have more than one cgi-bin?
>

No, "cgi-bin" is not a reserved directory name. For example with NCSA
httpd_1.0 you must define in "conf/srm.conf" ScriptAlias, like :

_____________________________________________________________________

...
# ScriptAlias: This controls which directories contain server scripts.
# Format: ScriptAlias fakename realname

ScriptAlias /cgi-bin/ /usr/local/etc/httpd/cgi-bin/

_____________________________________________________________________

You can define a ScriptAlias whith "/htbin/" for fakename (or any other
name), you can have several ScriptAliases directives, like :

_____________________________________________________________________

...
# ScriptAlias: This controls which directories contain server scripts.
# Format: ScriptAlias fakename realname

ScriptAlias /cgi-bin/ /usr/local/etc/httpd/cgi-bin/
ScriptAlias /htbin/ /usr/local/etc/httpd/cgi-bin/exec

_____________________________________________________________________

Example if I want subdirectory "perl" and "csh" for script I must have
config file like this :

_____________________________________________________________________

...
# ScriptAlias: This controls which directories contain server scripts.
# Format: ScriptAlias fakename realname

ScriptAlias /cgi-perl/ /usr/local/etc/httpd/cgi-bin/perl
ScriptAlias /cgi-csh/ /usr/local/etc/httpd/cgi-bin/csh

_____________________________________________________________________

URL are :
http://server/cgi-perl/script/extra_path
http://server/cgi-csh/script/extra_path

I can't have :
http://server/cgi-bin/perl/script/extra_path
http://server/cgi-bin/csh/script/extra_path

Guy Decoux