Skip to content

Instantly share code, notes, and snippets.

@allanbatista
Created August 19, 2016 12:56
Show Gist options
  • Save allanbatista/c60aa58b4f3b8bf9f620a77c2ed5580f to your computer and use it in GitHub Desktop.
Save allanbatista/c60aa58b4f3b8bf9f620a77c2ed5580f to your computer and use it in GitHub Desktop.
Create nginx path basic authentication
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