httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike O'Leary" <molear...@gmail.com>
Subject Re: Handler Problems
Date Wed, 07 Nov 2007 12:58:03 GMT
Gabriel,

This does not seem to fix my problem.  I'm surprised; I thought something
like this shoud work.  And I did try something like this with the Directory
directive.  Playing with it some more last night, I found that if I manually
did a

SetHandler cgi-script

in my cgi-bin directory (in httpd.conf) and had my module return DECLINED
for any cgi-bin requests that I would get the cgi scripts to behave
appropriately.  This is the only way I've gotten it to work thus far.  I was
just hoping for an easier solution.


On Nov 7, 2007 3:07 AM, Gabriel Pap <paco@gulo.sk> wrote:

>
> Try something like this ...
>
> <Location />
>   SetHandler YOURMODULE
> </Location>
>
> # everything you dont want to handle with your module
> <Location /site>
>  SetHandler none
> </Location>
>
> #...
> <Location /robots.txt>
>  SetHandler none
> </Location>
>
> ----- Original Message -----
> From: "Mike O'Leary" <moleary45@gmail.com>
> To: <modules-dev@httpd.apache.org>
> Sent: Wednesday, November 07, 2007 3:22 AM
> Subject: Handler Problems
>
>
> > Hello,
> >
> > I'm having some handler issues that I'm hoping someone can shed some
> light
> > on.  I am trying to have my own module handle most requests and have the
> > normal apache server handle the rest.  What would be ideal is if I could
> > somehow have the apache server handle all www.mysite.com/site/* urls and
> > my
> > module handle everything else.  I am not sure of a way to do this in the
> > http.conf file.
> >
> > Below is my current solution that doesn't quite work.  Thanks for any
> help
> > in advance!
> >
> >
> > In my http.conf file, I have a SetHandler line that globally sets my
> > module
> > to handle all requests.  In my module I check to see if the URI request
> is
> > for static website content in which case I do this:
> >
> > r->handler = "default-handler";
> > return DECLINED;
> >
> > This works fine for the most part, but I have found two problems:
> >
> > 1) If someone requests www.mysite.com, whatever normal logic that is
> > invoked
> > to serve the index.html page is no longer active and I get the 404 page.
> > I
> > have my own 404 page that is a perl script located in my cgi-bin.  I
> > actually get the 404 perl script in plain text as described in #2.
> >
> > 2) Any requests for cgi-bin content return the cgi scripts in plain
> text.
> > Not exactly what I was after.... :)
> >
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message