perl生产crypt脚本
cat passwd.pl
#!/usr/bin/perl
use strict;
my $pw=$ARGV[0] ;
print crypt($pw,$pw)."n";
?
chmod +x passwd.pl
./passwd.pl 密码 (将输出crypt加密后的密码)
?
加入nginx需要验证的目录
? server
? {
??? listen?????? 80;
??? server_name? passwd.1314it.com;
??? index index.html index.htm index.php;
??? root? /var/www/html/url/passwd;
??? autoindex on;
??? access_log? logs/passwd.1314it.com-access.log? wwwlogs;
??? error_log?? logs/passwd.1314it.com-error.log;
??? location ^~ /
??? {
??? auth_basic "Authorized users only";
??? auth_basic_user_file /usr/local/nginx/conf/passwd;
??? }
}