1.vi nginx_pwd.pl
#!/usr/bin/perl
use strict;
my $pw=$ARGV[0];
printcrypt($pw,$pw)."\n";
2.
chmod +x nginx_pwd.pl
3.perl nginx_pwd.pl 密碼
4.vi nginx.conf
lo
cation/nginx-status{
auth_basic "NginxStatus";
stub_status on;
access_log on;
auth_basic_user_
file Linux/1727.html' target='_blank'>
htpasswd;
}
5.vi htpasswd
用戶名:密碼
6.nginx -s reload
7.http://ip/nginx-status