httpd-vhost文件设置问题

httpd-vhost文件设置问题

#
# 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:http://httpd.apache.org/docs/2.2/vhosts/>
# 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 222.222.222.222: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 <VirtualHost> block.
#
<VirtualHost 222.222.222.222:80>
    ServerAdmin info@aaa.com
    DocumentRoot /home/blue/aaa
    ServerName www.aaa.com
    ErrorLog /var/log/aaa-error_log
    CustomLog /var/log/aaa-access_log common
</VirtualHost>



为什么我用www.aaa.com访问的时候,显示的却是httpd.conf里面的/usr/local/www/apache22/data/index.html呢?




解决了,原来2.2.4必须指定文件夹权限

<Directory "/home/www/aaa.com">
Options None
AllowOverride None
Order Deny,Allow
Allow from all
</Directory>