Created
August 19, 2016 12:56
-
-
Save allanbatista/c60aa58b4f3b8bf9f620a77c2ed5580f to your computer and use it in GitHub Desktop.
Create nginx path basic authentication
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 apt-get install apache2-utils | |
sudo htpasswd -c /etc/nginx/.htpasswd sidekiq | |
senha | |
sudo vim /etc/nginx/sites-enabled/default | |
# put this inside server | |
location /admin/sidekiq { | |
auth_basic "Restricted"; | |
auth_basic_user_file /etc/nginx/.htpasswd; | |
} | |
sudo service nginx restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment