标签:httpd实例
二、项目作业:<VirtualHost 172.16.11.11:80> Servername www.qmx.com DocumentRoot "/mnt/web/www1/" ErrorLog "logs/error_www1" Loglevel warn CustomLog "logs/access_www1" combined <Directory "/mnt/web/www1/"> Options none AllowOverRide none Order deny,allow Allow from all </Directory> <Location /server-status> SetHandler server-status Order deny,allow Deny from all Allow from 172.16.0.1 </Location> </VirtualHost>
给WWW1创建日志文件
touch error_www1 touch access_www1 chmod 660 error_www1 chmod 660 access_www1 chgrp apache error_www1 chgrp apache access_www1
创建web站点路径
mkdir -pv /mnt/web/www1
配置本地hosts文件,完成基于主机头的虚拟主机
访问www1虚拟主机,及其配置的服务器状态数据查询
同理配置www2
<VirtualHost 172.16.88.99:80> Servername www.qqzx.com DocumentRoot "/mnt/web/www2/" ErrorLog "logs/error_www2" Loglevel warn CustomLog "logs/access_www2" combined <Directory "/mnt/web/www2/"> Options none AllowOverRide none Order deny,allow Deny from 192.168.1.0/24 </Directory> </VirtualHost>
校验访问控制
2.为上面的第2)个虚拟主机提供https服务;
由于个人能力原因,尚未完成,敬请期待
标签:httpd实例
原文地址:http://blog.51cto.com/wangchaode/2108990