Last active
October 25, 2016 20:37
-
-
Save ishults/375335240fdc0c6560d0f4e6e23ecbaf to your computer and use it in GitHub Desktop.
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
sudo nano /etc/nginx/sites-enabled/default | |
# Add | |
server { | |
listen 80; | |
server_name example.com; # Your site | |
proxy_buffering off; | |
location / { | |
auth_basic "Home Assistant"; | |
auth_basic_user_file /etc/nginx/.htpasswd; # Your .htpasswd file | |
proxy_pass http://127.0.0.1:8123/; # The server you want to redirect to | |
proxy_set_header Host $host; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment