APACHE 升级到2.2版本以后提供和不少新模块的支持,也在性能和安全上有改进,也就造成一些新的机制和概念需要我们不断去摸索和熟悉,昨天遇到了安装好apache2并配置好httpd.conf后,无论访问什么路径都出现 403 错误,最后在Apache HTTP Server Version 2.2 手册里找到了解决的方法。
一种可能性是DocumentRoot选项的设置,如果在安装好apache2后修改了该选项,并且忘记了配置该新目录的访问权限就会出现这样的情况。正确配置应该如下
DocumentRoot "D:/masterphp"//此处修改以后,下面的地方也要修改
(省略#内的注释)
<Directory />
Options FollowSymLinks
AllowOverride None
order deny,allow
Deny from all
Satisfy all
</Directory>
<Directory "D:/masterphp">//此处与上行修改为相同路径
(省略#内的注释)
order allow,deny
Allow from all
</Directory>
由上可得,有问题看帮助文档是个很好的习惯。
这也是我踏上PHP+APACHE的第一步。加油!
我的环境版本为:
apache_2.2.4
mysql-5.0.27
php-5.2.1
六月 3rd, 2008 at 13:53
谢谢,终于知道为什么了,非常感谢!
十一月 15th, 2008 at 15:34
Is there any information about this subject in other languages?
十一月 15th, 2008 at 15:34
Why this web site do not have other languages support?