httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <jsl...@gmail.com>
Subject Re: [users@httpd] <Location>, Action and SetHandler
Date Wed, 22 Sep 2004 23:05:10 GMT
On Wed, 22 Sep 2004 15:13:51 -0700, Charles Hornberger <clh@caltech.edu> wrote:
> Hello,
> 
> I'm trying to experiment with using CGI scripts and <Location> directives
> to set up Apache handlers and am running into what, to me, looks like a
> strange bit of behavior. As far as I can tell, Apache "refuses" to use a
> CGI script as a handler unless a regular file corresponding to the
> location given in the <Location> directive exists.

In my opinion, the 2.0 behavior is correct.  The point of Action is to
process files.  If the file doesn't exist, there is nothing to
process.  In 1.3 you needed to do 404 handling yourself because of
this flaw.

Your application would better make use of a simple ScriptAlias, as in

Alias /static /home/charlie/test-handler
ScriptAlias /cgi-bin /home/charlie/test-handler/cgi-bin
ScriptAlias / /home/charlie/test-handler/cgi-bin/test-handler.cgi

If you need something more complicated, you may need RewriteRules, of course.
But it is much clearer in my opinion.

Having said all that, version 2.1 (the development version) has an
option on Action to allow "virtual" resources:
http://httpd.apache.org/docs-2.1/mod/mod_actions.html#action

Joshua.

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


Mime
View raw message