Created
May 20, 2011 20:19
-
-
Save pdeschen/983717 to your computer and use it in GitHub Desktop.
nginx 403 handling
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
upstream test { | |
server localhost:8080; | |
} | |
server { | |
... | |
error_page 401 =403 /login; | |
location ~ ^/model/(.*)$ { | |
auth_basic "Restricted"; | |
auth_basic_user_file conf/htpasswd; | |
proxy_pass http://test; | |
} | |
location = /login { | |
proxy_pass http://test; | |
} | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment