You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Rainer Traut <tr...@gmx.de> on 2007/09/04 18:24:22 UTC

[users@httpd] mod_rewrite: LoadModule order is important?

Hi,

am running Redhat EL4 U5 with redhat's Apache/2.0.52.

I noticed the order of loading the modules is important?

Part of httpd.conf:

LoadModule rewrite_module modules/mod_rewrite.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so

If I load the rewrite modul after the proxy modules I lose the 
rewriteengine function in my SSL virtual host. It uses the mod_proxy 
module there.

Is this possible? Maybe a bug?

Thx
Rainer


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


Re: [users@httpd] mod_rewrite: LoadModule order is important?

Posted by Jim Jagielski <ji...@jaguNET.com>.
Joshua Slive wrote:
> 
> On 9/4/07, Jim Jagielski <ji...@jagunet.com> wrote:
> 
> > Yep... but also recall that most modules use APR_HOOK_MIDDLE as
> > the ordering, and so the order of when the hooks actually
> > get run does depend on when the modules are loaded in and
> > when they call the ap_hook_* func. And unlike 1.3, 2.x
> > is such that the 1st modules loaded are also run 1st
> > unless the sort changes that (export SHOW_HOOKS and
> > then run Apache to see what happens)...
> >
> > (mostly an issue with AAA routines where the fall-through
> > matters)
> 
> Yes, but I would still consider it a bug if the ordering of LoadModule
> has an effect in this case. (It is a bug that is easy to fix simply by
> explicitly specifying the hook ordering in the code.)
> 

Agreed.

> In the AAA case, it is a little more complicated. I guess the ability
> to reorder using LoadModule could be considered a feature given that
> there is no other way to do it.

Yep. Undocumented feature ;)
-- 
===========================================================================
   Jim Jagielski   [|]   jim@jaguNET.com   [|]   http://www.jaguNET.com/
	    "If you can dodge a wrench, you can dodge a ball."

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


Re: [users@httpd] mod_rewrite: LoadModule order is important?

Posted by Joshua Slive <jo...@slive.ca>.
On 9/4/07, Jim Jagielski <ji...@jagunet.com> wrote:

> Yep... but also recall that most modules use APR_HOOK_MIDDLE as
> the ordering, and so the order of when the hooks actually
> get run does depend on when the modules are loaded in and
> when they call the ap_hook_* func. And unlike 1.3, 2.x
> is such that the 1st modules loaded are also run 1st
> unless the sort changes that (export SHOW_HOOKS and
> then run Apache to see what happens)...
>
> (mostly an issue with AAA routines where the fall-through
> matters)

Yes, but I would still consider it a bug if the ordering of LoadModule
has an effect in this case. (It is a bug that is easy to fix simply by
explicitly specifying the hook ordering in the code.)

In the AAA case, it is a little more complicated. I guess the ability
to reorder using LoadModule could be considered a feature given that
there is no other way to do it.

Joshua.

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


Re: [users@httpd] mod_rewrite: LoadModule order is important?

Posted by Jim Jagielski <ji...@jaguNET.com>.
On Sep 4, 2007, at 1:15 PM, Joshua Slive wrote:

> On 9/4/07, Rainer Traut <tr...@gmx.de> wrote:
>> Hi,
>>
>> am running Redhat EL4 U5 with redhat's Apache/2.0.52.
>>
>> I noticed the order of loading the modules is important?
>>
>> Part of httpd.conf:
>>
>> LoadModule rewrite_module modules/mod_rewrite.so
>> LoadModule proxy_module modules/mod_proxy.so
>> LoadModule proxy_http_module modules/mod_proxy_http.so
>>
>> If I load the rewrite modul after the proxy modules I lose the
>> rewriteengine function in my SSL virtual host. It uses the mod_proxy
>> module there.
>>
>> Is this possible? Maybe a bug?
>
> Could be. LoadModule order isn't supposed to have an effect in 2.x.
> But you are using an ancient version. You should try with something
> more modern before reporting a bug.
>

Yep... but also recall that most modules use APR_HOOK_MIDDLE as
the ordering, and so the order of when the hooks actually
get run does depend on when the modules are loaded in and
when they call the ap_hook_* func. And unlike 1.3, 2.x
is such that the 1st modules loaded are also run 1st
unless the sort changes that (export SHOW_HOOKS and
then run Apache to see what happens)...

(mostly an issue with AAA routines where the fall-through
matters)


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


Re: [users@httpd] mod_rewrite: LoadModule order is important?

Posted by Rainer Traut <tr...@gmx.de>.
Joshua Slive schrieb:
> On 9/4/07, Rainer Traut <tr...@gmx.de> wrote:
>> Hi,
>>
>> am running Redhat EL4 U5 with redhat's Apache/2.0.52.
>>
>> I noticed the order of loading the modules is important?
>>
>> Part of httpd.conf:
>>
>> LoadModule rewrite_module modules/mod_rewrite.so
>> LoadModule proxy_module modules/mod_proxy.so
>> LoadModule proxy_http_module modules/mod_proxy_http.so
>>
>> If I load the rewrite modul after the proxy modules I lose the
>> rewriteengine function in my SSL virtual host. It uses the mod_proxy
>> module there.
>>
>> Is this possible? Maybe a bug?
> 
> Could be. LoadModule order isn't supposed to have an effect in 2.x.
> But you are using an ancient version. You should try with something
> more modern before reporting a bug.

Ok, thx for all the answers.
This is not a big deal for me now that I know where the problem is, but 
it took me half a day to localise it.
It's more problematic to leave the redhat's security path and compile by 
myself.

Thx
Rainer



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


Re: [users@httpd] mod_rewrite: LoadModule order is important?

Posted by Joshua Slive <jo...@slive.ca>.
On 9/4/07, Rainer Traut <tr...@gmx.de> wrote:
> Hi,
>
> am running Redhat EL4 U5 with redhat's Apache/2.0.52.
>
> I noticed the order of loading the modules is important?
>
> Part of httpd.conf:
>
> LoadModule rewrite_module modules/mod_rewrite.so
> LoadModule proxy_module modules/mod_proxy.so
> LoadModule proxy_http_module modules/mod_proxy_http.so
>
> If I load the rewrite modul after the proxy modules I lose the
> rewriteengine function in my SSL virtual host. It uses the mod_proxy
> module there.
>
> Is this possible? Maybe a bug?

Could be. LoadModule order isn't supposed to have an effect in 2.x.
But you are using an ancient version. You should try with something
more modern before reporting a bug.

Joshua.

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