httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Charles Hornberger <...@caltech.edu>
Subject Re: [users@httpd] <Location>, Action and SetHandler
Date Thu, 23 Sep 2004 23:28:43 GMT
On Thu, Sep 23, 2004 at 07:12:00PM -0400, Joshua Slive wrote:
> On Thu, 23 Sep 2004 11:58:03 -0700, Charles Hornberger <clh@caltech.edu> wrote:
> > On Wed, Sep 22, 2004 at 07:05:10PM -0400, Joshua Slive wrote:
> > > 
> > > 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
> > 
> > This is indeed a wonderfully simple-looking setup. Unfortunately it
> > seems like this doesn't do what I need. I want all locations beneath /,
> > with the exception of locations beneath /static and /cgi-bin, to be
> > handled by my handler. This only handles / using my handler. In other
> > words, if I request /bubbles, I get a 404 error, not an invocation of my
> > handler with the PATH_INFO set to /bubbles. Or am I missing something
> > again?
> 
> Have you tried this?  I haven't, so it might not work, but it
> shouldn't have the problem you suggest.  Alias/ScriptAlias do
> substring matches, so the ScriptAlias should get every URL starting
> with "/" (meaning every URL).

I've tried it; as I said, that setup did _not_ work for any requests
other than /. Perhaps the problem is that we've paired a directory with a
file in the second ScriptAlias directive, and Apache takes this to mean
that it should use /test-hander.cgi to process requests for the
directory, but not for the directory's contents? (Just groping blindly
here...)

> What you want is for arbitrary URLs to trigger a cgi script.  But that
> is easy enough to do with ScriptAlias (or, if necessary, mod_rewrite),
> so there is no need for anything fancy.

Point taken. I'm just trying to avoid using rewrite rules, against which
I admit to harboring intense personal prejudice :-). (Frankly, I see
rewrite rules as fancy, and think the SetHandler mechanism is elegant &
simple.) If ScriptAlias worked the way you suggested, then of course I'd
drop this whole thing and move to that immediately.

-- 
Charles Hornberger
Caltech / Division of the Humanities & Social Sciences

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