I am getting the following error,
You don't have permission to access /nagios/ on this server.
Apache/2.2.15 (Red Hat) Server at localhost Port 80"
after completing Nagios installation and visiting "http://localhost/nagios"
on firefox web browser. How can I solve this.
Obviously, Nagios has Web interface and access to it must be enabled, which is a normal and secure way of installing things.
Depending on your setup, you may have a GUI for configuring Nagios (Gnome, KDE,...) or you may have to enable it manually.
If manually, locate your Apache configuration, see if there is a config fragment for Nagios. Something like:
The path may vary, depending on the distribution. Or it may be missing, completely, in which case you may want to create it and include it in your master config file (httpd.conf).
In that fragment you should enable access to Nagios from the hosts you want to access it from. In your case it would be only "localhost". So, something of this sort would do:
Deny from all
Allow from localhost
...The Nagios access goes here, CGI, whatever...
I do not know how Nagios actually serves its web interface, so the part with "..." is for you to find or figure out. I would expect Nagios to place the fragment in your Apache config, so you would need only to uncomment some parts.