Skip to content

Instantly share code, notes, and snippets.

@gwarnants
Last active August 29, 2015 14:02
Show Gist options
  • Save gwarnants/53bda562e0a3ad94fad6 to your computer and use it in GitHub Desktop.
Save gwarnants/53bda562e0a3ad94fad6 to your computer and use it in GitHub Desktop.
Cross version Apache access control
<Directory "/var/web/www/">
# use mod_authz_host since Apache 2.4
<IfDefine APACHE24>
Require local
</IfDefine>
# use mod_access before 2.4
<IfDefine !APACHE24>
Order Deny,Allow
Deny from all
Allow from 127.0.0.1 ::1 localhost
</IfDefine>
</Directory>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment