nginx配置須登陸的nginx-status


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


location/nginx-status{
             auth_basic             "NginxStatus";
             stub_status on;
             access_log  on;
             auth_basic_user_file   htpasswd;
        }

5.vi htpasswd it

用戶名:密碼 io

6.nginx -s reload table

7.http://ip/nginx-status import

相關文章
相關標籤/搜索