Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save foozlereducer/9548086 to your computer and use it in GitHub Desktop.

Select an option

Save foozlereducer/9548086 to your computer and use it in GitHub Desktop.
AuthType Basic
AuthName "Restricted Area"
AuthUserFile /var/www/path/.htpasswd
# We are not allow group access so this is set to null
AuthGroupFile /dev/null
Require valid-user
# allow public access to the following resources
# allow access to the feeds folder
SetEnvIf Request_URI "(path/to/feeds/)$" allow
SetEnvIf Request_URI "(path/to/some_php_file\.php)$" allow
SetEnvIf Request_URI "(path/to/another/resource/)$" allow
# allow access before we consider if access should be denied
Order allow,deny
# allow access to apply the directives for any allowed variable you've specified
Allow from env=allow
# allow open access to entire site for select ips and sites
Allow from 67.229.74.117
Allow from example.tld
# apply all matching directives.
Satisfy any
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment