[users@httpd] How to enable a module for each request?

2020-04-27 Thread Jeffrey Walton
Hi Everyone, I'm having trouble figuring out how to enable my module for all requests. The module is loading via /etc/httpd/conf.modules.d/00-base.conf. After it is loaded and registers the hook it is never called. Here is the register_hook function, which is called. static void register_hoo

Re: [users@httpd] What is n in a hook function?

2020-04-27 Thread Eric Covener
On Mon, Apr 27, 2020 at 12:09 PM Jeffrey Walton wrote: > > On Mon, Apr 27, 2020 at 12:01 PM Eric Covener wrote: > > > > On Mon, Apr 27, 2020 at 11:52 AM Jeffrey Walton wrote: > > > > > > I'm reading https://httpd.apache.org/docs/2.4/developer/hooks.html. It > > > says to declare a hook function:

Re: [users@httpd] What is n in a hook function?

2020-04-27 Thread Nick Kew
> On 27 Apr 2020, at 16:52, Jeffrey Walton wrote: > > Hi Everyone, > > I'm reading https://httpd.apache.org/docs/2.4/developer/hooks.html. It > says to declare a hook function: > >AP_DECLARE_HOOK(int, do_something, (request_rec *r, int n)) That declares a hook to enable modules to inser

Re: [users@httpd] What is n in a hook function?

2020-04-27 Thread Jeffrey Walton
On Mon, Apr 27, 2020 at 12:01 PM Eric Covener wrote: > > On Mon, Apr 27, 2020 at 11:52 AM Jeffrey Walton wrote: > > > > I'm reading https://httpd.apache.org/docs/2.4/developer/hooks.html. It > > says to declare a hook function: > > > > AP_DECLARE_HOOK(int, do_something, (request_rec *r, int n

Re: [users@httpd] What is n in a hook function?

2020-04-27 Thread Eric Covener
On Mon, Apr 27, 2020 at 11:52 AM Jeffrey Walton wrote: > > Hi Everyone, > > I'm reading https://httpd.apache.org/docs/2.4/developer/hooks.html. It > says to declare a hook function: > > AP_DECLARE_HOOK(int, do_something, (request_rec *r, int n)) > > But it does not explain the parameters. I kn

[users@httpd] What is n in a hook function?

2020-04-27 Thread Jeffrey Walton
Hi Everyone, I'm reading https://httpd.apache.org/docs/2.4/developer/hooks.html. It says to declare a hook function: AP_DECLARE_HOOK(int, do_something, (request_rec *r, int n)) But it does not explain the parameters. I know what request_rec is, but I don't know what n is. What is n in the h

[users@httpd] Apache 2.4.41 mod_proxy_balancer worker's busyness count doesn't decrement back to zero when idle

2020-04-27 Thread Boyer, Maxime
Hello Apache Community! I'm looking for some assistance. We're running Apache 2.4.41 on Windows Server 2012R2 as a reverse proxy load balancer. Sometimes, when not serving any requests, the balancer workers report a busyness count greater than 0 (usually 1, but currently 2 and 1) on the balanc

Re: [users@httpd] Only allow reverse proxy traffic with mod_remoteip

2020-04-27 Thread baptx
I meant a VirtualHost with: Require expr "%{REMOTE_ADDR} != %{CONN_REMOTE_ADDR}" On Mon, 27 Apr 2020 at 15:44, baptx wrote: > By the way, I noticed that a VirtualHost with: > > Require expr "%{REMOTE_ADDR} != %{CONN_REMOTE_ADDR}" > > has a dangerous behaviour that I did not notice directly.

Re: [users@httpd] Only allow reverse proxy traffic with mod_remoteip

2020-04-27 Thread baptx
By the way, I noticed that a VirtualHost with: Require expr "%{REMOTE_ADDR} != %{CONN_REMOTE_ADDR}" has a dangerous behaviour that I did not notice directly. It made my .htaccess files visible publicly by accessing them in a web browser when using the reverse proxy (Cloudflare). This also resulte