我正在尝试使用 apache(服务器版本:Apache/2.2.15(Cent OS 6))运行我的 Haskel fastcgi 程序,
以下是在 httpd.conf 中所做的更改
<IfModule fastcgi_module>
AddHandle fastcgi-script .fcgi
</IfModule>
LoadModule fastcgi_module modules/mod_fastcgi.so
<VirtualHost *:80>
ServerAdmin webmaster@<hostname>
DocumentRoot /var/www
ServerName <hostname>
ErrorLog logs/<hostname>.com-error_log
CustomLog logs/<hostname>-access_log common
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
<Directory "/var/www/http">
Options -Indexes FollowSymLinks +ExecCGI
AllowOverride AuthConfig FileInfo
AddHandler fastcgi-script .fcgi
Order allow,deny
Allow from all
</Directory>
<Directory "/var/www/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
当我访问链接 curl --include http://hostname/cgi-bin/test.fcgi
我在 apache 服务器日志中收到错误
[错误] 脚本头过早结束:test.fcgi
我该如何调试这个问题?