Category Archives: nginx

Password protecting nginx

Create a Username/Password which will be stored in ‘useraccess’, a file I just made up.

htpasswd -b -c useraccess username password

Now in the nginx config, under:

auth_basic "Message box title of password prompt";
auth_basic_user_file /path/to/useraccess;