Skip to content

Instantly share code, notes, and snippets.

@roma-glushko
Last active June 18, 2020 12:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save roma-glushko/67ea09ed45c9bc5f2b3ab4017ab5d826 to your computer and use it in GitHub Desktop.
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
<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