我在 Windows XP 上使用 Apache 2.4.4。在尝试运行 CGI 脚本时,浏览器给出“500 Internal Server Error”,我在浏览各种论坛后尝试解决,但到目前为止没有运气我的 httpd.conf 文件如下:
<IfModule alias_module>
ScriptAlias /cgi-bin/ "D:/config/apache/cgi-bin/"
</IfModule>
<IfModule cgid_module>
#Scriptsock cgisock
</IfModule>
<Directory "D:/config/apache/cgi-bin/">
AllowOverride All
Options Includes ExecCGI
Order allow,deny
Allow from all
Require all granted
</Directory>
我还查看了错误日志,这就是问题所在:
[win32:error] [pid 3824:tid 1216] [client 192.168.1.4:1728] AH02102: D:/config/apache/cgi-bin/printenv.pl is not executable; ensure interpreted scripts have "#!" or "'!" first line
[cgi:error] [pid 3824:tid 1216] (9)Bad file descriptor: [client 192.168.1.4:1728] AH01222: don't know how to spawn child process: D:/config/apache/cgi-bin/printenv.pl
请,非常感谢任何帮助。提前致谢