httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reindl Harald <>
Subject Re: [RFC] <IfDirective>?
Date Tue, 21 Feb 2017 22:20:30 GMT

Am 21.02.2017 um 22:58 schrieb Joe Orton:
> For cases like HttpProtocolOptions where a new directive is introduced
> to multiple active branches simultaneously, it gets awkward to use
> <IfVersion> to write conf files which use the new directive but are
> compatible across multiple versions.
> Triggered by a conversation with a user, but also e.g. see current test
> suite t/conf/ which breaks for 2.4 releases older than
> 2.4.25 with:
>   <IfVersion >= 2.2.32>
>     <VirtualHost _default_:http_strict>
>       DocumentRoot @SERVERROOT@/htdocs/
>       HttpProtocolOptions Strict Require1.0 RegisteredMethods
> Any reason <IfDirective> is a bad idea, so we can do that more cleanly
> (... in a couple of decades time)?

you need to wrap that at least in <IfModule> since mod_version is not 
mandatory and httpd if unforgiving for unknown options

for the same reason the dance below is needed

<IfModule !mod_version.c>
  <IfModule mod_authz_core.c>
   Require all denied
  <IfModule !mod_authz_core.c>
   Order deny,allow
   Deny from All
<IfModule mod_version.c>
  <IfVersion < 2.4>
   Order deny,allow
   Deny from all
  <IfVersion >= 2.4>
   Require all denied

View raw message