欧美亚洲中文,在线国自产视频,欧洲一区在线观看视频,亚洲综合中文字幕在线观看

      1. <dfn id="rfwes"></dfn>
          <object id="rfwes"></object>
        1. 站長資訊網(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號