1.vi nginx_pwd.pl nginx
|
#!/usr/bin/perl
use strict;
my $pw=$ARGV[0];
print crypt($pw,$pw)."\n";
|
2. chmod +x nginx_pwd.pl spa
3.perl nginx_pwd.pl 密碼 ip
4.vi nginx.conf ci
5.vi htpasswd it
用戶名:密碼 io
6.nginx -s reload table
7.http://ip/nginx-status import