亚洲最大看欧美片,亚洲图揄拍自拍另类图片,欧美精品v国产精品v呦,日本在线精品视频免费

  • 站長資訊網(wǎng)
    最全最豐富的資訊網(wǎng)站

    Centos7 Apache服務(wù)器配置用戶認證

    1.生成認證文件/etc/httpd/password

    [root@bogon /]# htpasswd -c /etc/httpd/password zhangsan
    New password:
    Re-type new password:
    Adding password for user zhangsan
    [root@bogon /]# htpasswd /etc/httpd/password lishi
    New password:
    Re-type new password:
    Adding password for user lishi
    [root@bogon /]#
    [root@bogon /]# cat /etc/httpd/password
    zhangsan:$apr1$GepjhXih$XOhB.VdkohgSQtmGUAMYb1
    lishi:$apr1$5dPs76l2$OcITuDWwHlXV6lRQLC/2e0
    [root@bogon /]#

    2.在/etc/httpd/conf/httpd.conf 加如下內(nèi)容:

    Alias /app22 /app2

    AuthType Basic
    Authname "This is a private dir"
    AuthUserFile /etc/httpd/password #用htpasswd 命令生成的認證文件
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
    Require valid-user #請求/app2時要求用戶認證

    3.關(guān)閉selinux防火墻:setenforce 0

    4.service httpd restart

    5.測試訪問

    Centos7 Apache服務(wù)器配置用戶認證

    贊(0)
    分享到: 更多 (0)
    網(wǎng)站地圖   滬ICP備18035694號-2    滬公網(wǎng)安備31011702889846號