You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Matthew Webster <eu...@freeuk.com> on 2002/12/05 23:38:36 UTC

[users@httpd] bizarre cgi stuff

Ok, I got the Perl cgi to work, the only thing is....

...all that ScriptAlias appears to do is prevent a directory listing of 
the cgi-bin directory AND prevent the DirectoryIndex directive from 
working inside the cgi-bin directory!

This is very bizarre.

Also, it doesn't appear to matter what directives I use to control 
where scripts are allowed to be executed; as long as I have

AddHandler cgi-script .pl

in or above the directory with the script, it will execute.

This is all rather odd to my mind.  I thought that the AddHandler would 
let scripts get executed and ScriptAlias (as one method) would indicate 
WHERE they should be executed.  Anywhere else they would just be normal 
files.

Does anyone know what's going on or do I have a rogue version of Apache?



Best regards,
Matt.

-- 
Matthew Webster - 07984 164 535
eudoxus@freeuk.com
http://www.eudoxus.freeuk.com/

---------------------------------------------------------------------
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
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] bizarre cgi stuff

Posted by Zac Stevens <zt...@cryptocracy.com>.
Hi Matthew,

Generally speaking, you're going to need to include the relevant parts of
your configuration to get a good answer.  However, you seem to
misunderstand the use of some of these directives.

On Thu, Dec 05, 2002 at 10:38:36PM +0000, Matthew Webster wrote:
> This is all rather odd to my mind.  I thought that the AddHandler would 
> let scripts get executed and ScriptAlias (as one method) would indicate 
> WHERE they should be executed.  Anywhere else they would just be normal 
> files.

AddHandler lets you specify the handler to be used for a particular type of
file, defined by the extension.  ie, that all '.pl' files are to be handled
by the CGI engine.  I believe this is what you are presently using.

ScriptAlias is an extension of the Alias directive which also causes all
requests made through the ScriptAlias to be invoked as CGI. ie,

ScriptAlias /cgi-bin/ /var/www/cgi-bin/

would map any requests for "http://test.com/cgi-bin/<foo>" to
"/var/www/cgi-bin/<foo>", and would treat the later path as a CGI program
to be executed.


HTH,


Zac

---------------------------------------------------------------------
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
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org