Skip to content

Instantly share code, notes, and snippets.

@vivianspencer
Created January 7, 2016 12:38
Show Gist options
  • Save vivianspencer/a60eac4079c1d41b82b6 to your computer and use it in GitHub Desktop.
Save vivianspencer/a60eac4079c1d41b82b6 to your computer and use it in GitHub Desktop.
Password Authentication for Nginx
sudo sh -c "echo -n 'username:' >> /var/www/example.com/.htpasswd"
sudo sh -c "openssl passwd -apr1 >> /var/www/example.com/.htpasswd"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment