directory

How to password protect NGINX directories

TL;DR mc -e /etc/nginx/nginx.conf location / { auth_basic “Restricted”; auth_basic_user_file /home/domain//public_html/.htpasswd; } htpasswd -c /home/domain/public_html/.htpasswd username Now restart NGINX: # service nginx restart The /

Read More
Scroll to Top