1.1.1 现象
安装完毕AWSTATS后,运行URL,出现如下错误提示:
You don't have permission to access /awstats/awstats.pl on this server.
Apache的error.log中错误信息如下:
[Wed Mar 26 17:17:37.911338 2014] [authz_core:error] [pid 10748:tid 980] [client ::1:55910] AH01630: client denied by server configuration: D:/PHPDevEnv/awstats/cgi-bin/awstats.pl
1.1.2 原因
一看感觉是权限问题,可是查看了httpd.conf,发现权限是有的:
<Directory "D:/PHPDevEnv/Awstats"> Options None AllowOverride None Order allow,deny Allow from all </Directory> |
已经设置了Allow from all,表示权限开放了,在网上查找很多资料,都说要修改对应目录的写权限,可是设置了写权限也还是一样。
后来又查找到资料,说是在apache 2.4 目录权限关键字调整了。
原先:
Order Allow, Deny
Allow from all
改为:
Require all granted
1.1.3 解决
httpd.conf进行修改:
<Directory "D:/PHPDevEnv/Awstats"> Options None AllowOverride None Order allow,deny Allow from all Require all granted </Directory> |