
CentOS
htpasswd with Nginx on CentOS 7
To setup basic HTTP authentication with Nginx on CentOS 7, first install httpd-tools. Create user and password: Amend your Nginx vhost configuration: Add the following lines: Check and reload vhost configuration: