在公网部署服务 nginx访问权限设置 给请求增加密码
·
安装工具
yum -y install httpd-tools
生成配置文件
htpasswd -c test.passwd prometheus
test.passwd : 文件名
prometheus: 帐号名
配置nginx
server
{
listen 9093;
location / {
proxy_pass http://localhost:3000;
auth_basic "Basic Authentication";
auth_basic_user_file "/www/server/nginx/test.passwd";
}
}
更多推荐



所有评论(0)