我在 Debian 服务器上重新安装了一个名为 dsc-statistics-presenter 的软件包。它在我之前的安装中运行良好,但现在我无法使其工作。错误403,访问被禁止。那么,让我给你一些细节。
从/var/log/
:
[Sun Nov 27 17:34:09.186447 2016] [authz_core:error] [pid 26682:tid 140497263544064] [client 192.168.1.32:44134] AH01630: client denied by server configuration: /usr/lib/cgi-bin/dsc-statistics/dsc-grapher
从路径:
root@UKLNDLABDMZ:~# cat /usr/lib/cgi-bin/dsc-statistics/dsc-grapher
#!/usr/bin/perl -w
use strict;
use warnings;
use CGI;
use DSC::grapher;
my $grapher = DSC::grapher->new;
$grapher->cgi(new CGI);
$grapher->run();
如果你想查看文件权限:
root@UKLNDLABDMZ:~# ls -l /usr/lib/cgi-bin/dsc-statistics/dsc-grapher
-rwxr-xr-x 1 root root 148 Dec 15 2012 /usr/lib/cgi-bin/dsc-statistics/dsc-grapher
仅从 apt-get 安装的有关该软件包的 Apache conf 如下
root@UKLNDLABDMZ:~# cat /etc/apache2/conf-available/dsc-statistics-presenter.conf
Alias /dsc /usr/share/dsc-statistics-presenter/html
ScriptAlias /cgi-bin/dsc-statistics /usr/lib/cgi-bin/dsc-statistics
root@UKLNDLABDMZ:~# ls -ld /usr/lib/cgi-bin/dsc-statistics
drwxr-xr-x 2 root root 4096 Nov 27 18:41 /usr/lib/cgi-bin/dsc-statistics
http://192.168.99.10/cgi-bin/dsc-statistics/dsc-grapher
更新:
apt-get install libapache2-mod-perl2
和
a2enmod cgi
错误从 403 变为 500