#
# This should be changed to whatever you set DocumentRoot to.
#控制谁能访问这个网站
Order allow,deny 所以缺省状态下只是对默认的主目录/usr/local/apache22/htdocs采用默认的设置是拒绝所有访问的.
让默认对所有的目录都允许所有人访问.这里应该改为你设的DocumentRoot
做多端口的虚拟主机
2.2.4如ssl,在使用的时候先要在主配置文件里面包含此配置文件,修改httpdconf,编辑配置文件目录下的/extra/httpd-vhosts.conf
[root@server1 extra]# vi httpd-vhosts.conf
#
# Virtual Hosts
#
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# [/url]
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.
#
# Use name-based virtual hosting.
#
NameVirtualHost *:80
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any block.
#