Last active
December 15, 2015 06:19
-
-
Save mitchkramez/afa6f73954c54466730f to your computer and use it in GitHub Desktop.
Ignore HTTP Auth for a Specific IP (vhost.conf)
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
# Put this in the vhost.conf... otherwise remove the directory wrappers when using as an htaccess... but use it in the vhost.conf, not the htaccess. | |
# Allow traffic from IP without login | |
SetEnvIf Remote_Addr ^11\.11\.11\.11$ MOVE_ALONG=true | |
# Allow traffic from any iPhone user agent without login | |
SetEnvIfNoCase User-Agent iPhone MOVE_ALONG=true | |
<Directory "/var/www/vhosts/vhost.com/httpdocs"> | |
Satisfy Any | |
Order deny,allow | |
Deny from all | |
Allow from env=MOVE_ALONG | |
</Directory> | |
<Directory "/var/www/vhosts/vhost.com/httpsdocs"> | |
Satisfy Any | |
Order deny,allow | |
Deny from all | |
Allow from env=MOVE_ALONG | |
</Directory> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment