Skip to content

Instantly share code, notes, and snippets.

@sylvaincombes
Created July 7, 2017 13:17
Show Gist options
  • Save sylvaincombes/85c39fb4512bc03f1bd3d8da07ff5eec to your computer and use it in GitHub Desktop.
Save sylvaincombes/85c39fb4512bc03f1bd3d8da07ff5eec to your computer and use it in GitHub Desktop.
Http Auth on host condition
<IfVersion >= 2.4>
<If "%{HTTP_HOST} == 'recette.myproject.company.com'">
AuthName "My project"
AuthType Basic
AuthUserFile "/home/www/recette.myproject.company.com/.htpasswd"
Require valid-user
</If>
</IfVersion>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment