Problems with cgi-bin script Apache


#1

Hi

Have a problem with Nagios and Apache I am unable to go to pages using nagios/cgi-bin.
I got the error message "Error: Could not read object configuration data !.
when I look in the access log for Apache I can see double / it looks strange to me.
“GET /nagios/cgi-bin//tac.cgi” shuld it be // there ?
Nagios is working fine but not with Apache.
Someone that had this problem before ?


#2

Hi!

no, the // shouldn’t be there;
the source is likely to come from your httpd.conf config file for apache.
You should check it (to narrow your problem, open it, and search for the word ScriptAlias; check these lines and those below).
Make sure there are no //.

If you’re unsure, post the lines here.

Hope this helps


#3

Thanks for the reply

Here is my httpd.conf and nagios.conf

#**ScriptAlias /cgi-bin/ “/var/www/cgi-bin/”

#NAGIOS******

#ScriptAlias /nagios/cgi-bin/ /usr/lib/nagios/cgi-bin/ #<Directory /usr/lib/nagios/cgi-bin>

Options ExecCGI

order deny,allow

deny from all

allow from 127.0.0.1

AuthType Basic

AuthUserFile /etc/nagios/htpasswd.users

AuthName “nagios”

require valid-user

#

#END NAGIOS***************

“/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
#**

ScriptAlias /nagios/cgi-bin/ “/usr/lib/nagios/cgi-bin/”
<Directory /usr/lib/nagios/cgi-bin/>
Options ExecCGI
order deny,allow
deny from all
allow from 127.0.0.1
AuthType Basic
AuthUserFile /etc/nagios/htpasswd.users
AuthName "nagios"
require valid-user

Alias /nagios /usr/share/nagios/html
<Directory /usr/share/nagios/html>
Options None
order deny,allow
deny from all
allow from 127.0.0.1
AuthType Basic
AuthUserFile /etc/nagios/htpasswd.users
AuthName "nagios"
require valid-user


#4

Coul it a permission problem in the CGI folder ?


#5

Ups; sorry… i didn’t read carefully your first question and jumped a bit too quickly on the // problem.

In fact, your problem may just come from an error in your nagios config files. You should check them using the:
nagios-dir/bin/nagios -v /nagios-dir/etc/nagios.cfg
command
It will tell you what the problem is, if there is one.

If it doesn’t solve your problem, you may refer to the FAQ on the officiel nagios website:
nagios.org/faqs/viewfaq.php? … desc=false

And if it still doesn’t work, post again here :wink:

btw:
I tried to call the tactical overview with /nagios/cgi-bin//tac.cgi on my computer and it worked …
so the // may not be the problem