Created
June 3, 2015 13:45
-
-
Save tevashov/b989c6931ea9b76c481e to your computer and use it in GitHub Desktop.
Host-sensitive access restrictions
This file contains hidden or 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
| # ---------------------------------------------------------------------- | |
| # :: Host-sensitive access | |
| # http://tomschlick.com/2009/11/08/conditional-htpasswd-multi-environments/ | |
| # ---------------------------------------------------------------------- | |
| # : LIVE host, ALLOW access [ EDIT HERE ] | |
| SetEnvIf HOST "^www.inbio-ventures.com" live_url | |
| # : LOCAL host, ALLOW access | |
| SetEnvIf HOST ".local$" local_url | |
| # : DEVELOPMENT version, DENY access | |
| SetEnvIf HOST ".dev.teff.pro$" testing_url | |
| Order Deny,Allow | |
| # : Specify path to .htpasswd on development server | |
| AuthUserFile /home/user87641092323/etc/34292594.passwd | |
| AuthName "Development area" | |
| AuthType Basic | |
| AuthGroupFile / | |
| Require valid-user | |
| #: Allow valid-user for LOCAL & LIVE only | |
| Deny from all | |
| Allow from env=local_url | |
| Allow from env=live_url | |
| Satisfy any |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment