2009-10-24 444 views
0

当我尝试访问网页服务器“192.168.50.29/cgi-bin/tinyPL.cgi”时出现错误消息;看起来是这样的:内部服务器错误

Internal Server Error 

The server encountered an internal error or misconfiguration and was unable to complete your request. 

Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error. 

More information about this error may be available in the server error log. 
Apache/2.2.11 (Fedora) Server at 192.168.50.29 Port 80 

error_log中:

[Sat Oct 24 21:30:47 2009] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) 
[Sat Oct 24 21:30:47 2009] [notice] Digest: generating secret for digest authentication ... 
[Sat Oct 24 21:30:47 2009] [notice] Digest: done 
[Sat Oct 24 21:30:48 2009] [notice] Apache/2.2.11 (Unix) DAV/2 PHP/5.2.9 mod_ssl/2.2.11 OpenSSL/0.9.8g mod_perl/2.0.4 Perl/v5.10.0 configured -- resuming normal operations 
[Sat Oct 24 21:30:50 2009] [error] [client 192.168.50.69] (13)Permission denied: exec of '/var/www/cgi-bin/tinyPL.cgi' failed 
[Sat Oct 24 21:30:50 2009] [error] [client 192.168.50.69] Premature end of script headers: tinyPL.cgi 

可以在任何一个可以帮助我在这!

+0

从服务器错误日志中的任何东西? –

+0

你想帮忙什么? –

+0

这似乎属于更多的ServerFault,不是吗? – Twisol

回答

0

您的日志文件将有关于错误的更多详细信息,但CGI脚本上的内部服务器错误通常意味着当服务器尝试执行CGI程序时,预期的标题不存在。

在Perl脚本,这将是(例如):

use CGI qw(:standard); 
print header(); 

这将打印出像:

Content-type: text/html 

尝试并从命令行运行你的CGI脚本,看看是否打印出这些行。另一个问题可能是由于访问权限。 Apache可能无法执行您的脚本。