ngixn给页面添加用户名和密码
vim /ebsig/services/etc/nginx/nginx.conf
location / {
root $root_path;
auth_basic 'Restricted';
auth_basic_user_file htpasswd;
proxy_pass http://10.2.0.28:5000;
}
/usr/local/inonesoft/nginx/sbin/nginx -s reload
htpasswd -c /ebsig/services/etc/nginx/htpasswd dockerhub #创建用户名和密码,需要安装httpd-tools软件包
大家一起来学习