Impossible to access to the nagios web page

Hi everybody?

P.S: i’ve installed nagios 2.0 ON ReDHat ENTERPRISE LINUX 4, with currently one host monitored

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.0.52 (Red Hat) Server at Port 80

do you have an idea?


See, this uppercase, lowercase thing is a much softer, more polite way to communicate online. Now, onto your problem.

Have you tried executing

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

to see if Nagios returns any warnings or errors on the pre-flight check? I use those paths assuming you installed Nagios from source and kept the default paths.

This is the result of this command:

[blockquote]# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

Nagios 2.0
Copyright © 1999-2006 Ethan Galstad (
Last Modified: 02-07-2006
License: GPL

Reading configuration data…

Running pre-flight check on configuration data…

Checking services…
Checked 6 services.
Checking hosts…
Checked 1 hosts.
Checking host groups…
Checked 1 host groups.
Checking service groups…
Checked 0 service groups.
Checking contacts…
Checked 1 contacts.
Checking contact groups…
Checked 1 contact groups.
Checking service escalations…
Checked 0 service escalations.
Checking service dependencies…
Checked 0 service dependencies.
Checking host escalations…
Checked 0 host escalations.
Checking host dependencies…
Checked 0 host dependencies.
Checking commands…
Checked 9 commands.
Checking time periods…
Checked 1 time periods.
Checking extended host info definitions…
Checked 0 extended host info definitions.
Checking extended service info definitions…
Checked 0 extended service info definitions.
Checking for circular paths between hosts…
Checking for circular host and service dependencies…
Checking global event handlers…
Checking obsessive compulsive processor commands…
Checking misc settings…
Total Warnings: 0
Total Errors: 0

Things look okay - No serious problems were detected during the pre-flight check

Things seem ok but it’s doesn’t work any more!!
I was wondering if it’s not due to a problem with the httpd.conf file?

Well, what does your httpd.conf file look where you created the ScriptAlias and Alias to use for your Nagios directories?

Things seem ok but it’s doesn’t work any more!!

Any more? so it worked? if it WORKED but now it doesn’t i’d check what has been updated recently n the server.
If it never worked you probably misconfigured the webinterface… particulary (as SonOfThunder pointed out) the cgi-bin subdirectory.


Find below the ScriptAlias confered to nagios:
[blockquote]ScriptAlias /cgi-bin/ “/var/www/cgi-bin/”
<Directory “/var/www/cgi-bin”>
AllowOverride None
Options None
Order allow,deny
Allow from all

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

Alias /nagios “/usr/local/nagios/share”

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



Okay, looks like the problem is with your ScriptAlias. Nagios 2.x is kinda particular about this. You have to make sure you have the forward slashes at the end of your path to the sbin directory. Therefore,

ScriptAlias /nagios/cgi-bin “usr/local/nagios/sbin”
<Directory “/usr/local/nagios/sbin”>

should be changed to read

ScriptAlias /nagios/cgi-bin/ “/usr/local/nagios/sbin/”
<Directory “usr/local/nagios/sbin/”>

Hope that fixes it.

I was having the same issue you were having. I run RH Ent 4 and could not access any of the cgi pages. I found that in var/log/httpd/error_log it was a permissions issue. I also found that SELINUX was the cause. If you disable it in /etc/selinux/config . The CGI scripts will work.

Here is link l found that helped me and may help you. … um_id=1873

Yes, and if that’s the case, you’ll see an error message that mentions a premature end of script headers somewhere in your logs, or something of the sort. It appears to be a RH-specific issue, and depending on the version, you can solve it in a number of ways.

Hi gurus,
Finally, i 've founded out the solution!! (it was time)
After following your instructions, i faced the same problem i.e, “forbidden access to nagios”.
So i looked up my httpd.conf file, i saw that thereis no index directive correctly mentionned:

DirectoryIndex: sets the file that Apache will serve if a directory

is requested.

DirectoryIndex index.htm index.php** index.html** <=# it was it!!! ...] After that , it's works fine

Thanks a lot for your diligence

THANK YOU wifipap… I’ve been struggling for days and days with Fedora 4 to get this working, and your tip fixed it for me.