Basic_module user authentication
Install software that supports the htpasswd command
yum -y install httpd-tools
#Generate htpasswd password file
htpasswd -bc /usr/local/nginx/html/pass.db admin 123
Basic module use:
auth_basic "http://106.52.36.65";
auth_basic_user_file /usr/local/nginx/html/pass.db;
use:
location /status {
auth_basic "http://106.52.36.65";
auth_basic_user_file /usr/local/nginx/html/pass.db;
stub_status;
}
Result page:
autoindex automatic list: generally do not open
autoindex on;