Created
September 25, 2018 19:53
-
-
Save fcaldarelli/cdbbaf3156ff6b2218b1ebbb955e8890 to your computer and use it in GitHub Desktop.
apache2 allow access to password protected folder
This file contains hidden or 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
<Directory "/path-to-protected"> | |
AuthType Basic | |
AuthName "auth" | |
AuthUserFile "/auth-user-file-path" | |
require valid-user | |
SetEnvIf Request_URI "path-to-allow" allowed_restricted | |
Order allow,deny | |
Allow from 1.2.3.4 # allow from some ips | |
Allow from env=allowed_restricted # allow from some urls | |
Satisfy any | |
</Directory> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment