Premature end of script headers: CGI

I am having a lot of difficulty configuring httpd.conf to handle CGI.

I edited httpd.conf to add the Alias and ScriptAlias directives as
described in the nagios documentation.

I’m able to access the documentation, but i cannot manage the CGI commands, I keep getting the error: “Premature end of script headers: CGI”

i am trying to get nagios to work (Version: 2.0 Release: 0.b4.1)
with my FEDORA core 4, apache 2.0.43 webserver.

when i login to the specified url (localhost/nagios) i get to see the nagios index page,
but when i click the left hand menu the page will not load and will give me an internal server error.

when i browse httpd-error.log i find out it gives me this error:

[error] Pemature end of script headers: *.CGI referer: 127.0.0.1/nagios/side.html

last but not least i’ll put my httpd.conf additions for nagios:

ScriptAlias /nagios/cgi-bin/ /usr/local/bin/nagios/
<Directory “/usr/local/bin/nagios/”>
AllowOverride AuthConfig
Options ExecCGI
Order allow,deny
Allow from all

Alias /nagios /usr/local/share/nagios/
<Directory “/usr/local/share/nagios/”>
Options None
AllowOverride Authconfig
Order allow,deny
Allow from all

can be this problem due to a different users group? or a wrong setting of external cgi in http.conf?

any help?

thank you very much!

meulie.net/forum_viewtopic.php?21.1997

By using the search for this forum, you can find several of these same problems and soluttions.