Options All ExecCGI FollowSymLinks Includes IncludesNOEXEC MultiViews SymLinksIfOwnerMatch
DirectoryIndex index.html index.htm index.php
AllowOverride All
Order Deny,Allow
Allow from all
#新建测试页面
mkdir /var/www/html/web
echo "this is a test virtualhost" > web/index.html
service httpd restart
这样就可以访问对应的虚拟主机了,如果需要创建第二个虚拟主机的话直接在/etc/httpd/vhost目录里面复制
一份.conf的配置文件进行修改即可,这样管理方便,每个虚拟主机都有自己的配置文件;