Access to the most basic usage of certified papers nginx

1 Open the configuration file in the conf

Join in on server under location

auth_basic "the Input Password:" ; the pop-up message

auth_basic_user_file "/ usr / local / nginx / Pass" ; authentication password file

2. htpasswd generate the corresponding password file (httpd-tools to install package).

htpasswd -c /usr/local/nginx/pass lqinghua

Enter the password twice

Guess you like

Origin www.cnblogs.com/lqinghua/p/11619049.html