http基于用戶登錄
和前面一樣創建好http后
先編輯文本

這里配置的是只有xiaoming、xiaohong 這兩個用戶才可以登錄
然后,配置一下用戶檔案,不能用mkdir來創建
[root@localhost conf.d]# htpasswd -c /etc/httpd/mymima xiaoming
然后輸入設定的密碼
[root@localhost conf.d]# htpasswd /etc/httpd/mymima xiaohong
因為前面已經-c了,就不在需要了
配置好后,創建目錄
[root@localhost conf.d]# mkdir /www/0
[root@localhost conf.d]# echo asdjaskd > /www/0/index.html
然后重啟Http服務器,然后去瀏覽器測驗一下
輸入相對應的用戶和密碼即可


轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/304893.html
標籤:其他
