403 when accessing web interface

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

403 when accessing web interface

Postby wmashworth » Sun Jun 10, 2018 3:53 pm

My question seems very similar to this one: https://support.nagios.com/forum/viewtopic.php?t=10947&p=56685 in that we are both experiencing the same SSL errors in Apache2 logs.

Have been following this guide: https://www.digitalocean.com/community/tutorials/how-to-install-nagios-4-and-monitor-your-servers-on-ubuntu-16-04 on setting up Nagios Core on Ubuntu 16.04.

When running Nagios as a service, everything is reported okay.

This is my nagios.conf

Code: Select all
<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>


I have not uncommented
Code: Select all
SSLRequireSSL
(as the guide states) as I am not serving over HTTPS.

This is my error.log for Apache2: (tail -25)
Code: Select all
[Sun Jun 10 05:09:53.541043 2018] [mpm_prefork:notice] [pid 444] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Sun Jun 10 05:09:53.541091 2018] [core:notice] [pid 444] AH00094: Command line: '/usr/sbin/apache2'
[Sun Jun 10 10:39:12.894496 2018] [:error] [pid 7229] [client 176.74.13.14:54042] script '/var/www/html/xmlrpc.php' not found or unable to stat
[Sun Jun 10 14:51:16.234646 2018] [mpm_prefork:notice] [pid 444] AH00169: caught SIGTERM, shutting down
[Sun Jun 10 14:56:27.460250 2018] [mpm_prefork:notice] [pid 11478] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Sun Jun 10 14:56:27.460343 2018] [core:notice] [pid 11478] AH00094: Command line: '/usr/sbin/apache2'
[Sun Jun 10 14:59:51.575888 2018] [ssl:error] [pid 11481] [client 81.105.79.234:52841] AH02219: access to /usr/local/nagios/share failed, reason: SSL connection required
[Sun Jun 10 15:00:03.799264 2018] [ssl:error] [pid 11506] [client 81.105.79.234:52845] AH02219: access to /usr/local/nagios/share failed, reason: SSL connection required
[Sun Jun 10 15:01:34.511692 2018] [ssl:error] [pid 11530] [client 81.105.79.234:52882] AH02219: access to /usr/local/nagios/share failed, reason: SSL connection required
[Sun Jun 10 15:03:02.626686 2018] [ssl:error] [pid 11529] [client 127.0.0.1:44894] AH02219: access to /usr/local/nagios/share failed, reason: SSL connection required
[Sun Jun 10 15:34:40.394522 2018] [ssl:error] [pid 11530] [client 81.105.79.234:53479] AH02219: access to /usr/local/nagios/share failed, reason: SSL connection required
[Sun Jun 10 15:37:37.964344 2018] [ssl:error] [pid 11529] [client 81.105.79.234:53545] AH02219: access to /usr/local/nagios/share failed, reason: SSL connection required
[Sun Jun 10 15:37:39.946199 2018] [ssl:error] [pid 11529] [client 81.105.79.234:53545] AH02219: access to /usr/local/nagios/share failed, reason: SSL connection required
[Sun Jun 10 15:37:47.429467 2018] [ssl:error] [pid 11531] [client 81.105.79.234:53546] AH02219: access to /usr/local/nagios/share failed, reason: SSL connection required
[Sun Jun 10 15:49:34.230441 2018] [ssl:error] [pid 11531] [client 81.105.79.234:53725] AH02219: access to /usr/local/nagios/share failed, reason: SSL connection required
[Sun Jun 10 15:49:56.089856 2018] [ssl:error] [pid 11530] [client 81.105.79.234:53737] AH02219: access to /usr/local/nagios/share failed, reason: SSL connection required
[Sun Jun 10 16:07:21.651460 2018] [ssl:error] [pid 11531] [client 81.105.79.234:53932] AH02219: access to /usr/local/nagios/share failed, reason: SSL connection required
[Sun Jun 10 16:07:29.162615 2018] [ssl:error] [pid 11530] [client 81.105.79.234:53935] AH02219: access to /usr/local/nagios/share failed, reason: SSL connection required
[Sun Jun 10 16:10:47.110509 2018] [ssl:error] [pid 11506] [client 81.105.79.234:53957] AH02219: access to /usr/local/nagios/share failed, reason: SSL connection required
[Sun Jun 10 16:14:44.384617 2018] [ssl:error] [pid 11530] [client 81.105.79.234:53979] AH02219: access to /usr/local/nagios/share failed, reason: SSL connection required


As far as I can see, these are just SSL errors.

This is my access.log: (tail -25)
Code: Select all
81.105.79.234 - - [10/Jun/2018:15:34:40 -0400] "GET /nagios HTTP/1.1" 403 512 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36"
186.87.236.42 - - [10/Jun/2018:15:34:50 -0400] "GET / HTTP/1.0" 200 11595 "-" "-"
81.105.79.234 - - [10/Jun/2018:15:37:37 -0400] "GET /nagios HTTP/1.1" 403 512 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36"
81.105.79.234 - - [10/Jun/2018:15:37:39 -0400] "GET /nagios HTTP/1.1" 403 511 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36"
81.105.79.234 - - [10/Jun/2018:15:37:47 -0400] "GET /nagios HTTP/1.1" 403 512 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36"
151.53.240.29 - - [10/Jun/2018:15:41:24 -0400] "GET / HTTP/1.0" 200 11595 "-" "-"
181.174.92.30 - - [10/Jun/2018:15:48:26 -0400] "GET / HTTP/1.1" 200 11576 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36"
81.105.79.234 - - [10/Jun/2018:15:49:34 -0400] "GET /nagios HTTP/1.1" 403 512 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36"
81.105.79.234 - - [10/Jun/2018:15:49:56 -0400] "GET /nagios HTTP/1.1" 403 512 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36"
114.32.36.220 - - [10/Jun/2018:15:51:18 -0400] "GET / HTTP/1.0" 200 11595 "-" "-"
81.105.79.234 - - [10/Jun/2018:16:07:21 -0400] "GET /nagios HTTP/1.1" 403 512 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36"
81.105.79.234 - - [10/Jun/2018:16:07:29 -0400] "GET /nagios HTTP/1.1" 403 512 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36"
81.105.79.234 - - [10/Jun/2018:16:10:41 -0400] "GET /angios HTTP/1.1" 404 501 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36"
81.105.79.234 - - [10/Jun/2018:16:10:47 -0400] "GET /nagios HTTP/1.1" 403 512 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36"
81.105.79.234 - - [10/Jun/2018:16:14:44 -0400] "GET /nagios HTTP/1.1" 403 512 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36"
175.138.73.32 - - [10/Jun/2018:16:17:06 -0400] "GET / HTTP/1.0" 200 11595 "-" "-"
178.73.215.171 - - [10/Jun/2018:16:20:28 -0400] "GET / HTTP/1.0" 200 11595 "-" "-"
85.105.74.40 - - [10/Jun/2018:16:21:43 -0400] "GET / HTTP/1.0" 200 11595 "-" "-"
218.2.33.64 - - [10/Jun/2018:16:24:15 -0400] "GET / HTTP/1.0" 200 11595 "-" "-"
195.200.227.83 - - [10/Jun/2018:16:27:25 -0400] "GET / HTTP/1.0" 200 11595 "-" "-"
187.147.130.90 - - [10/Jun/2018:16:27:37 -0400] "GET / HTTP/1.1" 200 11576 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36"
202.71.18.61 - - [10/Jun/2018:16:28:52 -0400] "GET / HTTP/1.0" 200 11595 "-" "-"
54.198.179.231 - - [10/Jun/2018:16:29:44 -0400] "HEAD / HTTP/1.1" 200 255 "-" "Cloud mapping experiment. Contact research@pdrlabs.net"
134.17.131.34 - - [10/Jun/2018:16:34:49 -0400] "GET / HTTP/1.0" 200 11595 "-" "-"
88.163.209.120 - - [10/Jun/2018:16:35:28 -0400] "GET / HTTP/1.0" 200 11595 "-" "-"


(I can't see any problems here)

Any help would be appreciated :D
wmashworth
 
Posts: 2
Joined: Sun Jun 10, 2018 3:19 pm

Re: 403 when accessing web interface

Postby cdienger » Mon Jun 11, 2018 3:20 pm

Perhaps a restart of apache just needs to occur since the # SSLRequireSSL line should take care of the ssl requirement.

Or it may be configured elsewhere in the config. Do you see SSLRequireSSL anywhere else in the Apache config files?

Was that the comlete nagios.cfg or just portion? I've attached a copy of nagios.cfg from a lab machine if you'd like test with that.
Attachments
nagios.conf
(1.64 KiB) Downloaded 71 times
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
cdienger
Support Tech
 
Posts: 1902
Joined: Tue Feb 07, 2017 11:26 am

Re: 403 when accessing web interface

Postby wmashworth » Tue Jun 12, 2018 3:42 pm

Sorry for getting back so late. This issue has been resolved now. You were correct in assuming that apache2 needed restarting. When I did, I was able to access it by the Web UI/

Thank you :D
wmashworth
 
Posts: 2
Joined: Sun Jun 10, 2018 3:19 pm

Re: 403 when accessing web interface

Postby tmcdonald » Wed Jun 13, 2018 9:20 am

Great to hear! Did you have further (related) questions or are we good to lock this up?
Former Nagios employee
tmcdonald
 
Posts: 9118
Joined: Mon Sep 23, 2013 8:40 am


Return to Nagios Core

Who is online

Users browsing this forum: No registered users and 12 guests