【发布时间】:2014-05-27 23:09:54
【问题描述】:
我一直在使用 Apache CGI,并尝试在请求特定文件扩展名时运行 CGI 脚本。
我的 apache2.conf 中有以下内容:
AddHandler handle .html
Action handle /use/lib/cgi-bin/test.pl virtual
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory /usr/lib/cgi-bin>
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
因此,当我尝试从我的 DocumentRoot 目录请求一个 html 页面 Hello.html 时,我收到一条错误消息,指出它找不到结合了我的 CGI 脚本位置和请求文件的路径:
找不到
未找到请求的 URL /usr/lib/cgi-bin/test.pl/hello.html 这台服务器。 ryan-virtualbox 端口上的 Apache/2.2.22 (Ubuntu) 服务器 80未找到
为什么我的 CGI 脚本不能运行,为什么这个组合路径显示为 Not Found?
提前致谢。
【问题讨论】:
标签: apache perl cgi action directive