Linux系统下搭建网站
时间:2009-03-23 来源:sjhf
实验一:认证访问
# mkdir /www/test
# vi /www/test/index.html
# cd /etc/httpd/conf
# vi httpd.conf
<directory /www/test>
AllowOverride AuthConfig
</directory >
# vi .htaccess
AuthName "Insert your name!"
AuthType Basic
AuthUserFile “/etc/aaa”
require valid_users
# service httpd reload
# htpasswd -c /etc/aaa liuhaidan
#111 输入口令
#111 确认口令
# vi /etc/aaa
# chmod 644 /etc/aaa
# service httpd reload
测试结果:当客户端访问该网站的时候,必须知道访问口令才可以进入,否则该页无法显示。。。。。。
实验二:虚拟站点
分别创建 www.aaa.com
|
相关阅读 更多 +