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呢?
:em16::em16::em16:
:em16:
《解決方案》
解決了,原來2.2.4必須指定文件夾許可權
<Directory "/home/www/aaa.com">
Options None
AllowOverride None
Order Deny,Allow
Allow from all
</Directory>