Axel,

Thank you for the enlightenment. I saw the code myself, you are right,
even mod_rewrite requested the fixup hook to be registered after
"mod_proxy.c" by name!  So I got the picture of who should be called
first now though I'm still surprised of the changing of order thing that
make the behavior different but I will try to shut my mind of tracing it
(for now) since Neil's solution had me alive and running.

Thanks for the help guys.

Regards,
Tamer

-----Original Message-----
From: Axel-Stephane SMORGRAV [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 11, 2007 9:11 AM
To: users@httpd.apache.org
Subject: Re: [EMAIL PROTECTED] Apache mod_rewrite/mod_proxy conflict?

As I said in my previous post, the suggestion of Neil will work no matter what. 
No doubt about that.

What surprises me is that you mention that changing the order of the LoadModule 
directives actually changes the order in which the modules are executed. That 
does not make sense unless you are using Apache 1.3 (or older).

In 2.x the order in which the modules are executed is determined when the 
various hook handlers are registered, i.e. during initialisation of httpd. A 
hook handler can be registered to be executed FIRST, MIDDLE or LAST (there are 
actually a couple more, but irrelevant here). One can furthermore specify that 
a hook handler shall be executed before or after the handler for the same hook 
of a specified module (or list thereof).

All the hook handlers of mod_proxy are registered to be executed FIRST, and on 
top of that the fixup handler is explicitly registered to be executed before 
the equivalent handler of mod_rewrite. Most of the handlers of mod_rewrite, 
including the content handler are registered to be executed MIDDLE, thus AFTER 
those of mod_rewrite. The fixup handler of mod_proxy is a predecessor of the 
one of mod_rewrite.

Have a look at mod_rewrite.c and mod_proxy.c. You will find the function 
register_hooks() at the bottom of each file.

-ascs

-----Message d'origine-----
De : Tamer Embaby [mailto:[EMAIL PROTECTED]
Envoyé : lundi 10 décembre 2007 19:42
À : users@httpd.apache.org
Objet : RE: RE: [EMAIL PROTECTED] Apache mod_rewrite/mod_proxy conflict?

Axel,

It's totally my mistake! I didn't mention anything about the environment! (I'm 
hitting my head against the wall for 12+ hours daily for managing Vignette 
CMS).  So please forgive me about this.

No it's Apache 2.0.61 (latest) on Solaris 10 U4, and also Linux RHEL 4.4.

The solution that the other gentleman pointed me to (Neil Hillard) worked OK 
for me, problem solved, but I just need to understand how Apache 2.0 handle 
module loading and calling order, specifically with mod_rewrite/mod_proxy (the 
case I pointed below).

Regards,
Tamer

-----Original Message-----
From: Axel-Stephane SMORGRAV [mailto:[EMAIL PROTECTED]
Sent: Monday, December 10, 2007 8:30 PM
To: users@httpd.apache.org
Subject: RE: [EMAIL PROTECTED] Apache mod_rewrite/mod_proxy conflict?

Judging from your problem description, specifically the fact that modifying the 
ordering of the LoadModule directives changes the behaviour of the server, you 
must be using Apache 1.3.

>From Apache 2.0 on the order of execution of the various hooks is independent 
>of the order of LoadModule directives. Apache determines the ordering itself.

Had you used Apache 2.0 your ProxyPass directive would have gotten the upper 
hand on RewriteRule and there would have been nothing you could do about it 
except from what was suggested to you.

-ascs

-----Message d'origine-----
De : Tamer Embaby [mailto:[EMAIL PROTECTED] Envoyé : lundi 10 décembre 2007 
16:05 À : users@httpd.apache.org Objet : RE: [EMAIL PROTECTED] Apache 
mod_rewrite/mod_proxy conflict?

Neil,

Thanks for the answer, I will do that.

But still I want to understand the behavior of both modules, who get called 
first? Where can I read about this?

Thanks for your time.

Tamer

---------------------------------------------------------------------
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: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
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: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
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: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
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: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to