You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modules-dev@httpd.apache.org by karim Bendadda <ka...@gmail.com> on 2007/10/29 19:03:21 UTC

Calling a module befor the mod_proxy module

Hi everybody,

     I'm trying to call a custom module before calling the mod_proxy module
(as a reverse proxy). The problem is that just the mod_proxy works ( it
redirects me to the good server) ...my other module doesn't work when I try
to use the two modules(and it works alone), here the httpd.conf file:

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule headers_module modules/mod_headers.so
LoadModule auth_module modules/mod_auth.so <----- my module

After I configure the modules like that:

Proxyrequests off
ProxyPass /auth  http://server.test.com:50000/

<Location /auth>
  SetHandler auth
  ProxyPassReverse /
  RequestHeader unset Accept-Encoding
</Location>


Correct me if I'm wrong, when calling my module as the last one on the
httpd.conf file it will be charged as the first one?? How Can I call my
module and after the mod_proxy module??

Any suggestions??
Thanks.

-- 
Karim Bendadda

Re: Calling a module befor the mod_proxy module

Posted by karim Bendadda <ka...@gmail.com>.
I understand that Ihave to use hooks... calling the mod_proxy after the
custom module is not sufficient... I'll try to use the hook functions.

Thank you for help

2007/10/29, ed <ed...@s5h.net>:
>
> On Mon, 29 Oct 2007 20:03:21 +0200
> "karim Bendadda" <ka...@gmail.com> wrote:
>
> > Correct me if I'm wrong, when calling my module as the last one on the
> > httpd.conf file it will be charged as the first one?? How Can I call
> > my module and after the mod_proxy module??
>
> I'm new to all this, but don't you have to specify mod_proxy in the
> hook order, when calling ap_hook_handler?
>
> --
> The OC48 to Qwicky Mart is dying a slow death because of Windows 95.
> Pac Bell is selling their customers to MSN.
> :: http://www.s5h.net/ :: http://www.s5h.net/gpg
>
>


-- 
Karim Bendadda

Re: Calling a module befor the mod_proxy module

Posted by ed <ed...@s5h.net>.
On Mon, 29 Oct 2007 20:03:21 +0200
"karim Bendadda" <ka...@gmail.com> wrote:

> Correct me if I'm wrong, when calling my module as the last one on the
> httpd.conf file it will be charged as the first one?? How Can I call
> my module and after the mod_proxy module??

I'm new to all this, but don't you have to specify mod_proxy in the
hook order, when calling ap_hook_handler?

-- 
The OC48 to Qwicky Mart is dying a slow death because of Windows 95.
Pac Bell is selling their customers to MSN.
:: http://www.s5h.net/ :: http://www.s5h.net/gpg

Re: Calling a module befor the mod_proxy module

Posted by Eric Covener <co...@gmail.com>.
On 10/29/07, karim Bendadda <ka...@gmail.com> wrote:
> Correct me if I'm wrong, when calling my module as the last one on the
> httpd.conf file it will be charged as the first one?? How Can I call my
> module and after the mod_proxy module??

When you choose which hooks your module participates in, you can
explicitly choose which modules you want to precede/succede your
module.

The bottom of mod_proxy.c  shows you what hooks and ordering the proxy uses.

-- 
Eric Covener
covener@gmail.com