Skip to content

Instantly share code, notes, and snippets.

@everycopy
Last active August 29, 2015 13:56
Show Gist options
  • Save everycopy/9222082 to your computer and use it in GitHub Desktop.
Save everycopy/9222082 to your computer and use it in GitHub Desktop.
Put a directory behind a password using Nginx
printf "openssl passwd -apr1 123456" >> /home/domains/www/sodapopandco.com/staging/.htpasswd
location ^~ /staging/ {
auth_basic "Staging";
auth_basic_user_file staging/.htpasswd;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment