httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jack Bates <>
Subject Re: [users@httpd] Conditionally LoadModule?
Date Tue, 15 Nov 2016 15:56:26 GMT
On 14/11/16 07:59 PM, Eric Covener wrote:
> On Mon, Nov 14, 2016 at 9:40 PM, Jack Bates <> wrote:
>> Why doesn't the following work?
>>> <If "-f /usr/lib/apache2/modules/">
>>>     LoadModule php7_module      modules/
>>> </If>
>>> <Else>
>>>     LoadModule php5_module      modules/
>>> </Else>
>> /usr/lib/apache2/modules/ exists on my system,
>> but Apache keeps trying to load /usr/lib/apache2/modules/
>>> Cannot load modules/ into server:
>>> /usr/lib/apache2/modules/ cannot open shared object file: No such
>>> file or directory
> It should be syntactically rejected but probably isn't because of a bug.
> LoadModule is executed while being read at startup.
> <if> is evaluated during request processing, so it's obviously far too late.
> I do have a patch for <IfFile> that acts like <ifDefine> (works at
> startup) somewhere that would satisfy this kind of config. Otherwise,
> you need to do the test -f in a startup script, then pass -DFOO to
> apachectl based on the result, and use IfDefine in your config.

Thank you for this helpful reply.
Just a thought: Would it make sense to evaluate <If> both at startup and 
during request processing? Like is that a reasonable feature request?

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message