取消註釋
# Virtual hosts
Include conf/extra/httpd-vhosts.conf html
NameVirtualHost *:80 <VirtualHost *:80> ServerName abc.com ServerAlias www.abc.com DocumentRoot /usr/local/apache/htdocs/abc/ DirectoryIndex index.html index.htm <Directory "/usr/local/apache/htdocs/abc"> Options FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> </VirtualHost> <VirtualHost *:80> ServerName cba.com ServerAlias www.cba.com DocumentRoot /usr/local/apache/htdocs/cba/ DirectoryIndex index.html index.htm <Directory "/usr/local/apache/htdocs/cba"> Options FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> </VirtualHost>
這裏若是DocumentRoot指定了 /root/www/xxx目錄不管權限設置成什麼,都會出現403 訪問被拒絕的錯誤。 sql