Page 2 of 3

Re: Web Interface to Nagios Core - connection has timed out

Posted: Fri Jun 10, 2016 9:11 pm
by hbackus
tgriep:

nagios.conf file.................

[root@nagiosxi ~]# cat /etc/httpd/conf.d/nagios.conf
# SAMPLE CONFIG SNIPPETS FOR APACHE WEB SERVER
#
# This file contains examples of entries that need
# to be incorporated into your Apache web server
# configuration file. Customize the paths, etc. as
# needed to fit your system.

ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"

<Directory "/usr/local/nagios/sbin">
# SSLRequireSSL
Options ExecCGI
AllowOverride None
<IfVersion >= 2.3>
<RequireAll>
Require all granted
# Require host 127.0.0.1

AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
</RequireAll>
</IfVersion>
<IfVersion < 2.3>
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1

AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
</IfVersion>
</Directory>

Alias /nagios "/usr/local/nagios/share"

<Directory "/usr/local/nagios/share">
# SSLRequireSSL
Options None
AllowOverride None
<IfVersion >= 2.3>
<RequireAll>
Require all granted
# Require host 127.0.0.1

AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
</RequireAll>
</IfVersion>
<IfVersion < 2.3>
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1

AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
</IfVersion>
</Directory>
[root@nagiosxi ~]#

Re: Web Interface to Nagios Core - connection has timed out

Posted: Fri Jun 10, 2016 9:13 pm
by hbackus
eloyd:

OK, .thanks for the guidance...........

I will see if I can figure it out...............

Re: Web Interface to Nagios Core - connection has timed out

Posted: Fri Jun 10, 2016 9:20 pm
by eloyd
Good luck!

Re: Web Interface to Nagios Core - connection has timed out

Posted: Mon Jun 13, 2016 11:59 am
by hbackus
[root@nagiosxi etc]# cat /etc/httpd/conf.d/nagios.conf
# SAMPLE CONFIG SNIPPETS FOR APACHE WEB SERVER
#
# This file contains examples of entries that need
# to be incorporated into your Apache web server
# configuration file. Customize the paths, etc. as
# needed to fit your system.

ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"

<Directory "/usr/local/nagios/sbin">
# SSLRequireSSL
Options ExecCGI
AllowOverride None
<IfVersion >= 2.3>
<RequireAll>
Require all granted
# Require host 127.0.0.1

AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
</RequireAll>
</IfVersion>
<IfVersion < 2.3>
Order allow,deny
Allow from all
Order deny,allow
Deny from all
Allow from 127.0.0.1

AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
</IfVersion>
</Directory>

Alias /nagios "/usr/local/nagios/share"

<Directory "/usr/local/nagios/share">
# SSLRequireSSL
Options None
AllowOverride None
<IfVersion >= 2.3>
<RequireAll>
Require all granted
# Require host 127.0.0.1

AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
</RequireAll>
</IfVersion>
<IfVersion < 2.3>
Order allow,deny
Allow from all
Order deny,allow
Deny from all
Allow from 127.0.0.1

AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
</IfVersion>
</Directory>
[root@nagiosxi etc]#

Re: Web Interface to Nagios Core - connection has timed out

Posted: Mon Jun 13, 2016 12:21 pm
by tgriep
Try changing the /etc/httpd/conf.d/nagios.conf file with the following and see if that works for you.

Code: Select all

ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"

<Directory "/usr/local/nagios/sbin">
   Options ExecCGI
   AllowOverride None
   Order allow,deny
   Allow from all
   AuthName "Nagios Access"
   AuthType Basic
   AuthUserFile /usr/local/nagiosxi/etc/htpasswd.users
   Require valid-user
</Directory>

Alias /nagios "/usr/local/nagios/share"

<Directory "/usr/local/nagios/share">
   Options None
   AllowOverride None
   Order allow,deny
   Allow from all
   AuthName "Nagios Access"
   AuthType Basic
   AuthUserFile /usr/local/nagiosxi/etc/htpasswd.users
   Require valid-user
</Directory>

Re: Web Interface to Nagios Core - connection has timed out

Posted: Mon Jun 13, 2016 12:38 pm
by eloyd
I still say that this is your problem, not the configuration of your web server.
eloyd wrote:More importantly, I don't see anything in the log that shows you are actually hitting your Web server. Something is blocking or you are using the wrong address or else you would have seen browser based hits in your access log.
If you were hitting the web server at all from a browser, even with an invalid URL, you would still see something show up in the Apache log like this:

Code: Select all

192.168.1.108 - - [13/Jun/2016:13:38:05 -0400] "GET /asdf HTTP/1.1" 404 285 "-" "curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.0.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2"

Re: Web Interface to Nagios Core - connection has timed out

Posted: Mon Jun 13, 2016 2:08 pm
by hbackus
eloyd:

I understand , and it makes sense. Port 80 does not respond to a simple query like telnet <ip_address> 80 yet netstat -tulnp shows httpd listening on port 80.


tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 1708/httpd

Very confusing.

Re: Web Interface to Nagios Core - connection has timed out

Posted: Mon Jun 13, 2016 2:11 pm
by eloyd
Can you post the [sanitized, if required] output of "iptables -L -v -n" please? It's likely a firewall issue.

Re: Web Interface to Nagios Core - connection has timed out

Posted: Mon Jun 13, 2016 3:37 pm
by rkennedy
Also - to add to what @eloyd said. I'd like to make sure apache is actually running, this will help confirm the firewall issue.

From the Nagios machine, can you run curl -v 127.0.0.1/nagios/ and post the full output?

Different versions of apache act differently as well, what is the output of apachectl -v?

Re: Web Interface to Nagios Core - connection has timed out

Posted: Tue Jun 21, 2016 7:45 pm
by hbackus
tgriep:

ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"

<Directory "/usr/local/nagios/sbin">
# SSLRequireSSL
Options ExecCGI
AllowOverride None
<IfVersion >= 2.3>
<RequireAll>
Require all granted
# Require host 127.0.0.1

AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
</RequireAll>
</IfVersion>
<IfVersion < 2.3>
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1

AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
</IfVersion>
</Directory>

Alias /nagios "/usr/local/nagios/share"

<Directory "/usr/local/nagios/share">
# SSLRequireSSL
Options None
AllowOverride None
<IfVersion >= 2.3>
<RequireAll>
Require all granted
# Require host 127.0.0.1

AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
</RequireAll>
</IfVersion>
<IfVersion < 2.3>
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1

AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
</IfVersion>
</Directory>