Page 2 of 3

Re: The requested URL /nagios/< was not found on this server

Posted: Tue Oct 06, 2015 5:09 am
by tusharniras
rhassing wrote:It looks like your client is denied by the server.

Is there some sort of nagios.conf in the apache config (probably conf.d) directory?
Yes : /etc/nagios3/apache.conf

Code: Select all

# apache configuration for nagios 3.x
# note to users of nagios 1.x and 2.x:
#	throughout this file are commented out sections which preserve
#	backwards compatibility with bookmarks/config for older nagios versios.
#	simply look for lines following "nagios 1.x:" and "nagios 2.x" comments.

ScriptAlias /cgi-bin/nagios3 /usr/lib/cgi-bin/nagios3
ScriptAlias /nagios3/cgi-bin /usr/lib/cgi-bin/nagios3
# nagios 1.x:
#ScriptAlias /cgi-bin/nagios /usr/lib/cgi-bin/nagios3
#ScriptAlias /nagios/cgi-bin /usr/lib/cgi-bin/nagios3
# nagios 2.x: 
#ScriptAlias /cgi-bin/nagios2 /usr/lib/cgi-bin/nagios3
#ScriptAlias /nagios2/cgi-bin /usr/lib/cgi-bin/nagios3

# Where the stylesheets (config files) reside
Alias /nagios3/stylesheets /etc/nagios3/stylesheets
# nagios 1.x:
#Alias /nagios/stylesheets /etc/nagios3/stylesheets
# nagios 2.x:
#Alias /nagios2/stylesheets /etc/nagios3/stylesheets

# Where the HTML pages live
Alias /nagios3 /usr/share/nagios3/htdocs
# nagios 2.x: 
#Alias /nagios2 /usr/share/nagios3/htdocs
# nagios 1.x:
#Alias /nagios /usr/share/nagios3/htdocs
listen 10081
<DirectoryMatch (/usr/share/nagios3/htdocs|/usr/lib/cgi-bin/nagios3|/etc/nagios3/stylesheets)>
	Options FollowSymLinks

	DirectoryIndex index.php index.html

	AllowOverride AuthConfig
	
	#Order Allow,Deny
	#Allow From All
	Require all granted
	AuthName "Nagios Access"
	AuthType Basic
	AuthUserFile /etc/nagios3/htpasswd.users
	# nagios 1.x:
	#AuthUserFile /etc/nagios/htpasswd.users
	require valid-user
</DirectoryMatch>

<Directory /usr/share/nagios3/htdocs>
	Options	+ExecCGI	
</Directory>

# Enable this ScriptAlias if you want to enable the grouplist patch.
# See http://apan.sourceforge.net/download.html for more info
# It allows you to see a clickable list of all hostgroups in the
# left pane of the Nagios web interface
# XXX This is not tested for nagios 2.x use at your own peril
#ScriptAlias /nagios3/side.html /usr/lib/cgi-bin/nagios3/grouplist.cgi
# nagios 1.x:
#ScriptAlias /nagios/side.html /usr/lib/cgi-bin/nagios3/grouplist.cgi

Re: The requested URL /nagios/< was not found on this server

Posted: Tue Oct 06, 2015 5:59 am
by rhassing
please change the following line:

Code: Select all

Alias /nagios3 /usr/share/nagios3/htdocs
to

Code: Select all

Alias /nagios /usr/share/nagios3/htdocs
and try agian?

I think it only resolves /nagios3 for now.

Re: The requested URL /nagios/< was not found on this server

Posted: Tue Oct 06, 2015 6:14 am
by tusharniras
Same Error!!!

Re: The requested URL /nagios/< was not found on this server

Posted: Tue Oct 06, 2015 6:20 am
by rhassing
please do:

Code: Select all

ls -l /usr/lib/cgi-bin/nagios3
and

Code: Select all

ls -l /usr/share/nagios3/htdocs

Re: The requested URL /nagios/< was not found on this server

Posted: Tue Oct 06, 2015 7:40 am
by tusharniras
ls -l /usr/lib/cgi-bin/nagios3

Code: Select all

total 3988
-rwxr-xr-x 1 root root 288856 Jan  9  2014 avail.cgi
-rwxr-xr-x 1 root root 287416 Jan  9  2014 cmd.cgi
-rwxr-xr-x 1 root root 256000 Jan  9  2014 config.cgi
-rwxr-xr-x 1 root root 301104 Jan  9  2014 extinfo.cgi
-rwxr-xr-x 1 root root 251992 Jan  9  2014 histogram.cgi
-rwxr-xr-x 1 root root 227376 Jan  9  2014 history.cgi
-rwxr-xr-x 1 root root 227376 Jan  9  2014 notifications.cgi
-rwxr-xr-x 1 root root 223240 Jan  9  2014 outages.cgi
-rwxr-xr-x 1 root root 223248 Jan  9  2014 showlog.cgi
-rwxr-xr-x 1 root root 301112 Jan  9  2014 status.cgi
-rwxr-xr-x 1 root root 247872 Jan  9  2014 statusmap.cgi
-rwxr-xr-x 1 root root 243760 Jan  9  2014 statuswml.cgi
-rwxr-xr-x 1 root root 227376 Jan  9  2014 statuswrl.cgi
-rwxr-xr-x 1 root root 247904 Jan  9  2014 summary.cgi
-rwxr-xr-x 1 root root 239704 Jan  9  2014 tac.cgi
-rwxr-xr-x 1 root root 256096 Jan  9  2014 trends.cgi
ls -l /usr/share/nagios3/htdocs

Code: Select all

total 52
-rw-r--r-- 1 root root  549 Jan  9  2014 config.inc.php
drwxr-xr-x 2 root root 4096 Oct  5 08:37 contexthelp
drwxr-xr-x 3 root root 4096 Oct  5 08:37 images
drwxr-xr-x 2 root root 4096 Oct  5 08:37 includes
-rw-r--r-- 1 root root 1642 Jan  9  2014 index.php
drwxr-xr-x 2 root root 4096 Oct  5 08:37 js
-rw-r--r-- 1 root root 4320 Jan  9  2014 main.php
drwxr-xr-x 2 root root 4096 Jan  9  2014 media
-rw-r--r-- 1 root root   26 Jan  9  2014 robots.txt
-rw-r--r-- 1 root root 5756 Jan  9  2014 side.php
drwxr-xr-x 2 root root 4096 Jan  9  2014 ssi

Re: The requested URL /nagios/< was not found on this server

Posted: Tue Oct 06, 2015 7:57 am
by rhassing
please change the following line back to how it was:

Code: Select all

Alias /nagios3 /usr/share/nagios3/htdocs
to

Code: Select all

Alias /nagios3 /usr/share/nagios3/htdocs
and go to http://<yourserverip>:10080/nagios3/

and check the http error log file again.

One thing I don't get?
In your error file it is mentioned you are not allowed to see /usr/local/nagios/
In your config file you say all the files are in /usr/share/nagios3/htdocs and in /usr/lib/cgi-bin/nagios3

I think you have either two installations mixed up, or something is not configured correctly.

Re: The requested URL /nagios/< was not found on this server

Posted: Tue Oct 06, 2015 1:47 pm
by hsmith
Thanks for the help, Rob.

Let us know what you come up with @tusharniras.

Re: The requested URL /nagios/< was not found on this server

Posted: Tue Oct 06, 2015 11:35 pm
by tusharniras
@rhassing
Think I miss-configured things..
I can reinstall the apache and NagiOS if you suggest me the proper way..

Please help...

@hsmith

Hi Smith,

What you suggest me on this?

TUSHAR

Re: The requested URL /nagios/< was not found on this server

Posted: Wed Oct 07, 2015 12:08 am
by rhassing
maybe you should erase the Nagios rpm packages.

Code: Select all

rpm -qa | grep nagios
and than

Code: Select all

yum erase <packages> 
For proper installation you could check:
http://sites.box293.com/nagios/guides/installing-nagios

Re: The requested URL /nagios/< was not found on this server

Posted: Wed Oct 07, 2015 12:35 am
by tusharniras
rhassing wrote:maybe you should erase the Nagios rpm packages.

Code: Select all

rpm -qa | grep nagios
and than

Code: Select all

yum erase <packages> 
For proper installation you could check:
http://sites.box293.com/nagios/guides/installing-nagios
Okey!! I will follow this document... It will work on port 10080 right?