HTTP Basic Auth for Nginx
August 4, 2024
Introduction # Nginx has ability to enforce HTTP Basic Auth. Following are instruction on how to setup Creating a password through htpasswd like so sudo htpasswd -c /etc/nginx/.htpasswd ducky To install htpasswd command we need to run sudo apt-get install apache2-utils The above command will prompt for password for username ducky. Password file /etc/nginx/.htpasswd will be created Once this is done, we need to modify nginx’s config, specifically location block. ...