生成密碼檔案
添加配置檔案
nginx的啟動和停止
限制:啟用了upstream的不能添加
nginx_tcp_proxy_module
tcp {
upstream ha {
server 192.168.164.245:2255;
}
server {
listen 2255;
proxy_pass ha;
auth_basic "login test";
auth_basic_user_file conf/htpasswd;
}
}
nginx_tcp_proxy_module
tcp {
upstream ha {
server 192.168.164.245:2255;
}
server {
listen 2255;
proxy_pass ha;
auth_basic "login test";
auth_basic_user_file conf/htpasswd;
}
}