> ## Content Index
> Fetch the complete content index at: https://www.bagz.fr/llms.txt
> Use this file to discover other available public pages before exploring further.

# Apache - mod_auth compatibility for 2.2 and 2.4
- URL: https://www.bagz.fr/apache-mod_auth-compatibility-for-2-2-and-2-4/
- Published: 2016-11-21T09:09:30.000Z
- Updated: 2016-11-21T09:09:30.000Z
- Author: bgazui
- Tags: Linux, #Migrated-1790668826633, #wp, #wp-post, #Import 2026-09-29 08:00

Since Apache 2.4, **mod\_auth** changed and some directive like

Order allow,deny  
Allow from all  

that have been replaced with

Require all granted  

If you want to automatically handle same configuration for multiple servers where different versions of Apache are installed, you can use this trick:

<IfModule mod\_version.c>  
 <IfVersion < 2.4>  
 Order allow,deny  
 Allow from all  
 </IfVersion>  
 <IfVersion >= 2.4>  
 Require all granted  
 </IfVersion>  
</IfModule>  
<IfModule !mod\_version.c>  
 Order allow,deny  
 Allow from all  
</IfModule>  

Thanks to that change, your configuration will be working whatever version of Apache you're using.