Nagios Installation - URL not found
-
silverspirit
- Posts: 7
- Joined: Fri Oct 12, 2012 8:51 am
Nagios Installation - URL not found
Hi,
I recently installed Nagios Core on a SuSe Linux system incl. Apache.
The Apache testpage is visible when connecting from a remote site to /<server_name>/
Accessing Nagios is not possible using /<server_name>/nagios (The requested URL /nagios was not found on this server.)
I assume if the apache test webpage is visible there is no firewall restriction at all, so the nagios page should be visible ? (the server is using not the standard firewall, so I first would need to take a look at the manuals for this specific firewall)
The apache log is saying:
160.50.3.130 - - [12/Oct/2012:15:43:07 +0200] "GET /nagios HTTP/1.1" 404 204
The nagios log shows:
[1350045462] SERVICE ALERT: localhost;HTTP;CRITICAL;SOFT;2;Connection refused
[1350045522] SERVICE ALERT: localhost;HTTP;CRITICAL;SOFT;3;Connection refused
Thanks
silverspirit
I recently installed Nagios Core on a SuSe Linux system incl. Apache.
The Apache testpage is visible when connecting from a remote site to /<server_name>/
Accessing Nagios is not possible using /<server_name>/nagios (The requested URL /nagios was not found on this server.)
I assume if the apache test webpage is visible there is no firewall restriction at all, so the nagios page should be visible ? (the server is using not the standard firewall, so I first would need to take a look at the manuals for this specific firewall)
The apache log is saying:
160.50.3.130 - - [12/Oct/2012:15:43:07 +0200] "GET /nagios HTTP/1.1" 404 204
The nagios log shows:
[1350045462] SERVICE ALERT: localhost;HTTP;CRITICAL;SOFT;2;Connection refused
[1350045522] SERVICE ALERT: localhost;HTTP;CRITICAL;SOFT;3;Connection refused
Thanks
silverspirit
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Nagios Installation - URL not found
Have you cracked open your Apache server's access logs? I believe for suse they are located here:
Code: Select all
/var/log/httpd.access_log-
silverspirit
- Posts: 7
- Joined: Fri Oct 12, 2012 8:51 am
Re: Nagios Installation - URL not found
No, actually its about a SLES server, the access_log is located here
/usr/local/apache2/logs
/usr/local/apache2/logs
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Nagios Installation - URL not found
Oh sorry I must need more coffee, have you taken a look at the access_log? can you post it here?
-
silverspirit
- Posts: 7
- Joined: Fri Oct 12, 2012 8:51 am
Re: Nagios Installation - URL not found
find attached the complete apache2 access log file.
the connectivity tests were done at around 12/Oct/2012:14:29:08
I am also not sure what the other regular messages mean (error 200 45)
Thanks
the connectivity tests were done at around 12/Oct/2012:14:29:08
I am also not sure what the other regular messages mean (error 200 45)
Thanks
- Attachments
-
access_log.txt- access_log File
- (91.27 KiB) Downloaded 268 times
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Nagios Installation - URL not found
Did you add an apache conf that points to the nagios directory?
-
silverspirit
- Posts: 7
- Joined: Fri Oct 12, 2012 8:51 am
Re: Nagios Installation - URL not found
In the meantime I figured out, the 404 error was caused by a missing Alias in httpd.conf
Now I am getting 403 errors I'll try to fix.
I am wondering why this isn't part of the installation procedure...
Now I am getting 403 errors I'll try to fix.
I am wondering why this isn't part of the installation procedure...
-
silverspirit
- Posts: 7
- Joined: Fri Oct 12, 2012 8:51 am
Re: Nagios Installation - URL not found
I am getting confused again, still struggeling with 403 (permission denied) error, not sure what to do next, hopefully someone can point me to the right direction.
I have added the following lines to apache config file httpd.conf:
In the directory section I have tried both /usr/local/nagios/share (folder where eg index.php is located) and also /usr/local/nagios
In the logs I can see the following:
error_log
access log
Further for testing I have disabled (uncommented) the restrictions in the main Directory setting:
and now I was able to get at least the left frame of the page, but it wasn't shown properly. I also used the URL //<server_hostname>/nagios/index.php
I am also wondering why I didn't got the nagios login popup window yet
Any help is appreaciated.
I have added the following lines to apache config file httpd.conf:
Code: Select all
#document root alias
Alias /nagios /usr/local/nagios/share
<Directory /usr/local/nagios>
Order allow,deny
Allow from all
</Directory>In the logs I can see the following:
error_log
Code: Select all
[Mon Oct 15 16:43:04.981158 2012] [authz_core:error] [pid 14647:tid 140009560459024] [client 160.50.3.130:1459] AH0
1630: client denied by server configuration: /usr/local/nagios/share/index.php
[Mon Oct 15 16:43:12.199881 2012] [authz_core:error] [pid 14644:tid 140009501710096] [client 160.50.3.130:1460] AH0
1630: client denied by server configuration: /usr/local/nagios/shareCode: Select all
160.50.3.130 - - [15/Oct/2012:16:43:04 +0200] "GET /nagios/index.php HTTP/1.1" 403 218
160.50.3.130 - - [15/Oct/2012:16:43:12 +0200] "GET /nagios HTTP/1.1" 403 208Further for testing I have disabled (uncommented) the restrictions in the main Directory setting:
Code: Select all
<Directory />
# AllowOverride none
# Require all denied
</Directory>Code: Select all
160.50.3.130 - - [15/Oct/2012:16:50:58 +0200] "GET /nagios HTTP/1.1" 301 233
160.50.3.130 - - [15/Oct/2012:16:50:58 +0200] "GET /nagios/ HTTP/1.1" 403 209
160.50.3.130 - - [15/Oct/2012:16:51:06 +0200] "GET /nagios/%3C?php%20echo%20$corewindow;?> HTTP/1.1" 404 209
[Mon Oct 15 16:50:58.338970 2012] [autoindex:error] [pid 17004:tid 140009577244432] [client 160.50.3.130:1492] AH01
276: Cannot serve directory /usr/local/nagios/share/: No matching DirectoryIndex (index.html) found, and server-gen
erated directory index forbidden by Options directiveAny help is appreaciated.
Re: Nagios Installation - URL not found
I hate to ask, but is PHP installed on this system?
Your nagios.conf file should look something like this (this is from a source install):
Your nagios.conf file should look something like this (this is from a source install):
Code: Select all
ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"
<Directory "/usr/local/nagios/sbin">
# SSLRequireSSL
Options ExecCGI
AllowOverride None
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1
AuthName "Nagios Core"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
</Directory>
Alias /nagios "/usr/local/nagios/share"
<Directory "/usr/local/nagios/share">
# SSLRequireSSL
Options None
AllowOverride None
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1
AuthName "Nagios Core"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
</Directory>-
silverspirit
- Posts: 7
- Joined: Fri Oct 12, 2012 8:51 am
Re: Nagios Installation - URL not found
mh, PHP is not installed currently. I tried to install it before without success, later I was reading the Nagios openSUSE core Quickinstall guide where php was not included as required package. (in difference to the fedore guide) This seems to be wrong. 3 steps back 