2019-05-24 centos http

cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.bak
vim /etc/httpd/conf/httpd.conf


#添加下面一行到 
 Allowoverride authconfig
#拒绝所有访问

到 网页目录
cd /node6-data1/bin/webs/worklog

vim .htpasswd

AuthName "sys"
AuthType basic
AuthUserFile  /node6-data1/bin/webs/worklog/.htpasswd
require valid-user

参考

https://www.linuxidc.com/Linux/2017-05/143314.htm
https://blog.csdn.net/alexander_phper/article/details/52242474

你可能感兴趣的:(2019-05-24 centos http)