Re: Alternate cgi-bin directories not working on apache 2.0.52 on rhel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Error: "Premature end of script headers:"

Did you put the below line on top of your cgi file for html header?

Content-type: text/html\n\n"

Can Le

"gdwfkd@xxxxxxxxx" <gdwfkd@xxxxxxxxx> wrote:
This is weird.  New server.  cgi's don't execute outside the normal cgi-bin directory.  The problem was showing up as problems with a nagios install.  The nagios front page works, but the status pages, which are all cgi's, don't work.

I increased logging to debug in apache and I get:

[Tue Jan 09 14:53:21 2007] [error] [client 10.3.41.164] (13)Permission denied: exec of '/usr/lib/nagios/cgi/tac.cgi' f
ailed, referer: http://some.server.com/nagios/side.html
[Tue Jan 09 14:53:21 2007] [error] [client 10.3.41.164] Premature end of script headers: tac.cgi, referer: http://some.server.com/nagios/side.html

I tried some nagios config things, but then I took a simple hello world CGI, verified that it worked in the standard cgi-bin directory, and copied it into the script alias directory for nagios and it doesn't work.

Tried script alias directories in a few different partitions just to be sure.  None of them worked.

Compiled a different version of apache, non-rpm, and installed in another directory, and that works,.but don't want to go that route.

Any ideas?

Some details below:

apache on rhel:
httpd-2.0.52-25.ent
Linux some.server.com 2.6.9-42.ELsmp #1 SMP Wed Jul 12 23:27:17 EDT 2006 i686 i686 i386 GNU/Linux

Nagios install wasn't working.  conf.d/nagios.conf is:

##########

ScriptAlias /nagios/cgi-bin/ "/usr/lib/nagios/cgi/"
<Directory "/usr/lib/nagios/cgi/">
   Options ExecCGI
   AllowOverride None
   Order allow,deny
   Allow from all
   AuthName "Nagios Access"
   AuthType Basic
   AuthUserFile /etc/nagios/htpasswd.users
   Require valid-user
</Directory>

##########

Relevant cgi entry from the httpd.conf:

ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"

#
# "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "/var/www/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>

##########



__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux