Nginx http_auth_basic_module (Access Control)

ngx_http_auth_basic_module module
user-based access control, user authentication mechanisms using basic

 

User login authentication module

syntax:   auth_basic  String | OFF;
default: OFF auth_basic
context: server.loction.limit_except
configure user login-related settings

 

sytax:  auth_basic_user_file file;
default:  -
context:  server,location,limit_except

For the introduction of the above-described

 

User password file
1, a text inscription: format name: password: Comment
2, the encrypted text: passwd command is implemented by the
http-tools provided

 

 

Tools-create a HTTP
pw: 123456

 

 

 

 

The second parameter is created not need to add -c

 

 

Modify the configuration file

 

 

Test Access requires a password

 

 

Specific directories need to be validated you need to specify the location of the

ngx_http_stub_status_module module

 

 

Guess you like

Origin www.cnblogs.com/Mrchengs/p/11941781.html