这几天测试apache,virtualhost可把我给难住了,后来在CU上发贴,经过大家的指点,明白了,设定一个virtualhost之后还得加一段设置权限的配置。下面把我的配置段贴在这里吧。
DirectoryIndex index.html imeVirtualHost *:80
<VirtualHost *:80>
ServerAdmin
root@test2.com DocumentRoot /var/www/test2
ServerName test2.cn
ErrorLog /var/log/httpd/test2_error_log
CustomLog /var/log/httpd/test2_log combined
</VirtualHost>
<Directory "/var/www/test2">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
DirectoryIndex index.htm
</Directory>
391,1 35%