Created
February 21, 2017 18:09
-
-
Save forsaken1/4a1a4d432a2d2ab793bb11a1573ef57e to your computer and use it in GitHub Desktop.
Nginx phoenix config with basic auth
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 uphill_rating { | |
server 127.0.0.1:4000; | |
} | |
server{ | |
listen 80; | |
server_name uphill.krylov-alexey.ru; | |
location / { | |
try_files $uri @proxy; | |
} | |
location @proxy { | |
include proxy_params; | |
proxy_redirect off; | |
proxy_pass http://uphill_rating; | |
} | |
location /admin { | |
proxy_redirect off; | |
proxy_pass http://uphill_rating; | |
auth_basic "Admin panel"; | |
auth_basic_user_file /home/forsaken/apps/uphill_rating/.htpasswd; | |
} | |
#location ~ /\. { deny all; } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment