我的文件全部归 apache:apache 所有。所有目录都有 770 个权限,文件有 660 个权限。我原来的虚拟主机似乎没问题,但第二个虚拟主机在所有路径上都出现 403 错误。
这是我在 /etc/httpd/conf/httpd.conf 中的当前配置
<Directory "/var/www/site1">
Options Indexes FollowSymLinks
AllowOverride All
<IfModule mod_access.c>
Order allow,deny
Allow from all
</IfModule>
</Directory>
<Directory "/var/www/site2">
Options Indexes FollowSymLinks
AllowOverride All
<IfModule mod_access.c>
Order allow,deny
Allow from all
</IfModule>
</Directory>
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /var/www/site1/
ServerName site1.domain.com
ErrorLog /var/log/httpd/site1.error.log
CustomLog /var/log/httpd/site1.access.log common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /var/www/site2/
ServerName site2.domain.com
ErrorLog /var/log/httpd/site2.error.log
CustomLog /var/log/httpd/site2.access.log common
</VirtualHost>