How to setup http password authentication with nginx

sudo apt-get updatesudo apt-get install nginx
sudo service nginx status
sudo apt-get install apache2-utils
sudo htpasswd -c /etc/nginx/.httppassword testuser
nano /etc/nginx/.htpasswd
auth_basic "Private Property";     auth_basic_user_file /etc/nginx/.htpasswd;
sudo service nginx reload

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store