【发布时间】:2015-12-01 16:10:42
【问题描述】:
我正在尝试通过 localhost 测试 perl 脚本。我将 apache 配置为允许从 /usr/lib/cgi-bin 运行 perl 脚本(或者我认为是这样)。每当我访问 localhost/cgi-bin/script.pl 时,我都会收到 403 Forbidden 错误。这是我的 apache conf 文件。
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /home/cgtopher/public_html/
<Directory /home/cgtopher/public_html/>
Options FollowSymLinks Indexes
AllowOverride None
Order allow,deny
allow from all
</Directory>
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
#cgi-bin
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options ExecCGI FollowSymLinks
Order allow,deny
Require all granted
</Directory>
ErrorLog /home/cgtopher/.apache/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
在我的错误日志中,我不断收到以下信息:
[Sat Sep 05 10:30:12.565510 2015] [access_compat:error] [pid 10918] [client 127.0.0.1:60699] AH01797: client denied by server configuration: /usr/lib/cgi-bin/hello.pl
【问题讨论】:
标签: linux apache perl ubuntu cgi