This post will explain how to password protect a site in nginx. It is very simple and it uses the normal htpasswd protection
Suppose I need to password protect the site greproot.com whose document root is /var/www/greproot/public_html
Simple follow the steps given below
Now, your login details are stored to the file /var/www/greproot/public_html/.htpasswd and we need to call this file from greproot.com’s conf.
Simply add the following two lines before the locationsRead More