我有一個CGI腳本在我的本地(Ubuntu的10.04)的工作只是通過拖放到/ usr/lib目錄/ cgi-bin目錄怪異CGI錯誤
但是......在生產(Ubuntu的10.04),他們從來沒有運行:
Apache的error.log中:
[Sun Jun 13 13:13:58 2010] [error] (2)No such file or directory: exec of '/var/www/cgi-bin/tbk_bp_resultado.cgi' failed
[Sun Jun 13 13:13:58 2010] [error] [client 190.161.196.57] Premature end of script headers: tbk_bp_resultado.cgi
我檢查權限和似乎並沒有被這個問題:
drwsrwsrwx 2 root root 4096 Jun 12 19:54 datos
-rwxrwxrwx 1 root root 76 Jun 13 02:13 erf.cgi
drwsrwsrwx 2 root root 4096 Oct 2 2008 log
drwsrwsrwx 2 root root 4096 Jun 12 19:54 maestros
-rwxrwxrwx 1 root root 1282027 Sep 16 2008 tbk_bp_pago.cgi
-rwxrwxrwx 1 root root 1280404 Sep 16 2008 tbk_bp_resultado.cgi
-rwxrwxrwx 1 root root 1275985 Sep 16 2008 tbk_check_mac.cgi
drwsrwsrwx 2 root root 4096 Jun 12 19:54 template
在我的本地我沒有爲了工作做任何事情,但在生產中我要補充這在我的Apache的conf:
ScriptAlias /cgi-bin/ /var/www/cgi-bin/
<Directory /var/www/cgi-bin>
Options +ExecCGI
</Directory>
AddHandler cgi-script .cgi .pl
=(感謝。
嘗試將其添加到httpd.conf文件而不是apache.conf – Julen 2011-03-24 12:54:40