·11111
完成以上实验需要分步骤:
1.在/www下先建立三个目录,一个http,一个secret,还有一个mymima专门存放小明的账号密码信息
2.在/etc/httpd/conf.d/http.conf 编写程序文件
[root@localhost conf.d]# cat http.conf
listen 22222
<virtualhost 192.168.147.38:22222>
servername 192.168.147.38
documentroot /www/http
alias /mimi /www/http/secret
</virtualhost>
<directory /www/http/secret>
authtype basic
authname "please login"
authuserfile /www/1234
require user xiaoming
</directory>
<directory /www/http>
allowoverride none
require all granted
</directory>
3.在http,secret两个目录下分别建立两个index.html文件用来测试,我的文件内容一个是zuoye,一个是this is dashagua</