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/26 16:21:47 UTC

modules redirection

Hi ,

   I have created an Apache module (mod_authentification) which connects to
an external server in order to validate the user of an application.Now I
want to call the mod_proxy directly after calling the other module (the
mod_authentification) the mod_proxy will allow me to redirect informations
to a third server. I tried to make a Load mod_proxy after the Load
mod_authentification with the directives on the httpd.conf file:

<IfModule mod_proxy>
#mode reverse proxy
ProxyRequests On
ProxyVia On
#ProxyPreserveHost      On
ProxyReceiveBufferSize 4096
ProxyBadHeader         Ignore
ProxyPass / http://servertest.test:50000
ProxyPassReverse / http://servertest.test:50000
RequestHeader unset Accept-Encoding
</IfModule>

Have you any idea??

Thank you
-- 
Karim Bendadda

Re: modules redirection

Posted by karim Bendadda <ka...@gmail.com>.
It seems to be that I was searching for...I'll try it and tell you if it
works...

thank you and have a good weekend!

2007/10/26, ed <ed...@s5h.net>:
>
> On Fri, 26 Oct 2007 19:53:39 +0100
> ed <ed...@s5h.net> wrote:
>
> > On Fri, 26 Oct 2007 16:21:47 +0200
> > "karim Bendadda" <ka...@gmail.com> wrote:
> >
> > >    I have created an Apache module (mod_authentification) which
> > > connects to an external server in order to validate the user of an
> > > application.Now I want to call the mod_proxy directly after calling
> > > the other module (the mod_authentification) the mod_proxy will allow
> > > me to redirect informations to a third server. I tried to make a
> > > Load mod_proxy after the Load mod_authentification with the
> > > directives on the httpd.conf file:
>
> ... snip ...
>
> Ah misread your post. I think if you wish to execute modules in a
> certain order, you can define this in the hook parameters.
>
> See "Controlling hook calling order" here:
>
>   http://httpd.apache.org/docs/2.0/developer/hooks.html
>
> --
> The T3 to Redback1 is patchy because of a trailing space in /etc/passwd.
> Tech Support is gasing up the marketing hype machine.
> :: http://www.s5h.net/ :: http://www.s5h.net/gpg
>
>


-- 
Karim Bendadda

Re: modules redirection

Posted by ed <ed...@s5h.net>.
On Fri, 26 Oct 2007 19:53:39 +0100
ed <ed...@s5h.net> wrote:

> On Fri, 26 Oct 2007 16:21:47 +0200
> "karim Bendadda" <ka...@gmail.com> wrote:
> 
> >    I have created an Apache module (mod_authentification) which
> > connects to an external server in order to validate the user of an
> > application.Now I want to call the mod_proxy directly after calling
> > the other module (the mod_authentification) the mod_proxy will allow
> > me to redirect informations to a third server. I tried to make a
> > Load mod_proxy after the Load mod_authentification with the
> > directives on the httpd.conf file:  

... snip ...

Ah misread your post. I think if you wish to execute modules in a
certain order, you can define this in the hook parameters.

See "Controlling hook calling order" here:

  http://httpd.apache.org/docs/2.0/developer/hooks.html

-- 
The T3 to Redback1 is patchy because of a trailing space in /etc/passwd.
Tech Support is gasing up the marketing hype machine.
:: http://www.s5h.net/ :: http://www.s5h.net/gpg

Re: modules redirection

Posted by ed <ed...@s5h.net>.
On Fri, 26 Oct 2007 16:21:47 +0200
"karim Bendadda" <ka...@gmail.com> wrote:

>    I have created an Apache module (mod_authentification) which
> connects to an external server in order to validate the user of an
> application.Now I want to call the mod_proxy directly after calling
> the other module (the mod_authentification) the mod_proxy will allow
> me to redirect informations to a third server. I tried to make a Load
> mod_proxy after the Load mod_authentification with the directives on
> the httpd.conf file:

I'm not sure here. Someone on the list should correct me if this is
false, but I think you should set the values in the responses that you
want, and return DECLINED. I don't know how else you can can pass
execution to further modules without returning DECLINED.

This begs the question, how things like deflate can work as a module... 

The ISAPI interface works like a chain, which seems to be the major
difference between Apache modules and ISAPI that execution is passed
between all DLL entry points, and the DLL can return REQ_FINISHED to
indicate that no further execution should happen, otherwise things can
be changed and passed around. Exactly what the procedure is for the
same behaviour on this side of the fence is something that I'm still
trying to learn.

-- 
The Raid Array to www.humanclock.com is reporting 100% packet loss
because of a memory leak in the lyris server. The Empire is smoking a
big fatty. :: http://www.s5h.net/ :: http://www.s5h.net/gpg