Created
January 5, 2012 23:14
-
-
Save dbowling/1567899 to your computer and use it in GitHub Desktop.
Folder authentication with reverse proxy via NGINX
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
location / { | |
try_files $uri @proxy; | |
} | |
location ~ (/sait/.*|/vpsa/.*) { | |
auth_basic "Restricted"; | |
auth_basic_user_file passwords/test; | |
try_files $uri @proxy; | |
} | |
location @proxy { | |
proxy_pass http://lifeproductioncluster; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header Host $http_host; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment