Last active
June 18, 2020 12:58
-
-
Save roma-glushko/67ea09ed45c9bc5f2b3ab4017ab5d826 to your computer and use it in GitHub Desktop.
Disable HTTP auth for specific IP on the Apache server which is behind Varnish proxy
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
<Directory /home/usr/sites/> | |
Options Indexes FollowSymLinks MultiViews | |
AllowOverride All | |
AuthType Basic | |
AuthName "HTTP Auth" | |
AuthUserFile /etc/apache2/.htpasswd | |
SetEnvIf X-Forwarded-For ^1\.2\.3\.4 env_no_http_auth | |
<RequireAny> | |
Require env env_no_http_auth | |
Require valid-user | |
Require all granted | |
</RequireAny> | |
</Directory> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment