Created
May 10, 2017 12:20
-
-
Save chesio/334869430689aedd343867e46c051338 to your computer and use it in GitHub Desktop.
Restrict access to a file (debug.log) on Apache webserver
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Restrict access to debug.log only to certain IPs | |
<Files "debug.log"> | |
<IfModule mod_authz_core.c> | |
# Multiple IP (network) addresses need to be separated by space | |
Require ip 127.0.0.1 | |
</IfModule> | |
<IfModule !mod_authz_core.c> | |
Order deny,allow | |
Deny from all | |
# Multiple IP (network) addresses need to be separated by space | |
Allow from 127.0.0.1 | |
</IfModule> | |
</Files> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment