修改后重启apache,如果出现下面的问题,可以参考:
Apache配置虚拟主机出现“错误403,你无权查看该页”的问题配置多个域名绑在同一个IP上的虚拟主机时,会出现403错误,“禁止访问, 您无权查看该网页”,您可能没有权限用您提供的凭据查看此目录或网页。
自己的配置、权限都没有问题,查了一下网上资料,原来是apache2的默认安全机制的问题,这样处理:
在httpd.conf中找到:
<Directory />
Options FollowSymLinks
AllowOverride None
Order allow,deny
deny from all
</Directory>
改为:
<Directory />
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
或:
<Directory />
Options FollowSymLinks ExecCGI Indexes
AllowOverride None
Order deny,allow
deny from all
Satisfy all
</Directory>
为
<Directory />
Options FollowSymLinks ExecCGI Indexes
AllowOverride None
Order allow,deny
allow from all
Satisfy all
</Directory>
|