403 error on openSUSE 42.2

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
CMOS
Posts: 13
Joined: Sun Jan 22, 2017 6:57 am

403 error on openSUSE 42.2

Post by CMOS »

Hello all,

I've been trying to set up Nagios on the aforementioned distro but all I'm getting is a 403 error when I visit the Nagios localhost page. I followed the instructions here : https://assets.nagios.com/downloads/nag ... nsuse.html

The first thing I notice is when I go to visit the page, I'm not even prompted for a username. So I'm not sure if I'm getting the 403 for lack of authentication or if there's some other error at play.

Any help would be appreciated.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: 403 error on openSUSE 42.2

Post by mcapra »

Those docs were written before SUSE LEAP was even a thing. I would suggest running through this documentation as it's using a more modern version of Nagios Core and was written for LEAP 42.1

https://assets.nagios.com/downloads/nag ... nsuse.html
Former Nagios employee
https://www.mcapra.com/
CMOS
Posts: 13
Joined: Sun Jan 22, 2017 6:57 am

Re: 403 error on openSUSE 42.2

Post by CMOS »

Thanks for the reply! I ran through that guide and have the same issue. I don't run into any problems during the instruction but I still get 403.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: 403 error on openSUSE 42.2

Post by dwhitfield »

Does the same thing happen if you use the IP address instead of localhost? You might have something weird going on with your resolv.conf (or the equivalent in SUSE if they don't use that). When you say you go to the page, do you mean http://localhost/nagios? If you just go to http://localhost, you won't get redirected.

You might also want to take a look at https://support.nagios.com/kb/article.php?id=96. Clearly both instructions should work, but if the kb gets it going for you, maybe we need to edit the assets doc.
Last edited by dwhitfield on Mon Jan 23, 2017 5:47 pm, edited 1 time in total.
Reason: instead, not install...
CMOS
Posts: 13
Joined: Sun Jan 22, 2017 6:57 am

Re: 403 error on openSUSE 42.2

Post by CMOS »

The same thing does happen if I use the IP instead of hostname. I am going to localhost/nagios... It's just strange that I never get prompted for a username. I've used Nagios on RHEL before and was always prompted and I created the nagiosadmin and a password and assumed I would get prompted for it but it just goes straight to a 403 error.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: 403 error on openSUSE 42.2

Post by rkennedy »

Can you post your apache configuration files (most likely your entire conf.d directory), and also a copy of your apache access / error logs? Also, what version of apache is running?

I suspect we'll need to make changes to your apache configuration to point correctly, but we'll be able to see in the log files.
Former Nagios Employee
CMOS
Posts: 13
Joined: Sun Jan 22, 2017 6:57 am

Re: 403 error on openSUSE 42.2

Post by CMOS »

Apache2 version : Apache/2.4.23 (Linux/SUSE)

There are two files in the /etc/apache/conf.d : nagios.conf and php5.conf

Code: Select all

# 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>

Access Log :

Code: Select all

::1 - - [21/Jan/2017:11:38:46 -0500] "GET / HTTP/1.1" 403 985 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [21/Jan/2017:11:38:46 -0500] "GET /favicon.ico HTTP/1.1" 404 981 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [21/Jan/2017:11:38:46 -0500] "GET /favicon.ico HTTP/1.1" 404 981 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [21/Jan/2017:11:38:58 -0500] "GET /nagios HTTP/1.1" 403 971 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [21/Jan/2017:11:39:04 -0500] "GET /nagios HTTP/1.1" 403 971 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [21/Jan/2017:11:40:53 -0500] "GET /nagios HTTP/1.1" 403 971 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [21/Jan/2017:11:41:20 -0500] "GET /nagios HTTP/1.1" 403 971 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [21/Jan/2017:11:41:20 -0500] "GET /favicon.ico HTTP/1.1" 404 981 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [21/Jan/2017:11:41:20 -0500] "GET /favicon.ico HTTP/1.1" 404 981 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [21/Jan/2017:12:40:30 -0500] "GET /favicon.ico HTTP/1.1" 404 981 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [21/Jan/2017:12:40:30 -0500] "GET /favicon.ico HTTP/1.1" 404 981 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [21/Jan/2017:12:40:35 -0500] "GET / HTTP/1.1" 403 985 "http://localhost/nagios" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [21/Jan/2017:15:05:33 -0500] "GET /nagios HTTP/1.1" 403 971 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [21/Jan/2017:15:05:33 -0500] "GET /favicon.ico HTTP/1.1" 404 981 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [21/Jan/2017:15:05:41 -0500] "GET / HTTP/1.1" 403 985 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [21/Jan/2017:15:08:18 -0500] "GET /nagios HTTP/1.1" 403 971 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [21/Jan/2017:15:08:18 -0500] "GET /favicon.ico HTTP/1.1" 404 981 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [21/Jan/2017:15:20:37 -0500] "GET /nagios HTTP/1.1" 403 971 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [21/Jan/2017:15:20:44 -0500] "GET /nagios HTTP/1.1" 403 971 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [21/Jan/2017:15:28:59 -0500] "GET /nagios HTTP/1.1" 403 971 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [21/Jan/2017:17:15:05 -0500] "GET /favicon.ico HTTP/1.1" 404 981 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [21/Jan/2017:17:15:08 -0500] "GET /nagios HTTP/1.1" 403 971 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [21/Jan/2017:18:35:22 -0500] "GET /nagios HTTP/1.1" 403 971 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [21/Jan/2017:18:38:57 -0500] "GET /nagios HTTP/1.1" 403 971 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [21/Jan/2017:18:40:27 -0500] "GET /nagios/index.php HTTP/1.1" 403 971 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [22/Jan/2017:10:56:13 -0500] "GET /nagios HTTP/1.1" 403 971 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [22/Jan/2017:10:56:13 -0500] "GET /favicon.ico HTTP/1.1" 404 981 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [23/Jan/2017:14:21:38 -0500] "GET /nagios HTTP/1.1" 403 971 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [23/Jan/2017:14:22:10 -0500] "GET /nagios HTTP/1.1" 403 971 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [23/Jan/2017:14:22:15 -0500] "GET / HTTP/1.1" 403 985 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [23/Jan/2017:14:39:54 -0500] "GET /nagios HTTP/1.1" 403 971 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [23/Jan/2017:14:40:26 -0500] "GET /nagios HTTP/1.1" 403 971 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
::1 - - [23/Jan/2017:14:40:26 -0500] "GET /favicon.ico HTTP/1.1" 404 981 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
127.0.0.1 - - [23/Jan/2017:14:41:27 -0500] "GET / HTTP/1.0" 403 985 "-" "check_http/v2.1.4 (nagios-plugins 2.1.4)"
127.0.0.1 - - [23/Jan/2017:14:46:27 -0500] "GET / HTTP/1.0" 403 985 "-" "check_http/v2.1.4 (nagios-plugins 2.1.4)"
127.0.0.1 - - [23/Jan/2017:14:51:27 -0500] "GET / HTTP/1.0" 403 985 "-" "check_http/v2.1.4 (nagios-plugins 2.1.4)"
127.0.0.1 - - [23/Jan/2017:14:56:27 -0500] "GET / HTTP/1.0" 403 985 "-" "check_http/v2.1.4 (nagios-plugins 2.1.4)"
::1 - - [23/Jan/2017:14:57:51 -0500] "GET /nagios HTTP/1.1" 403 971 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"
127.0.0.1 - - [23/Jan/2017:15:01:27 -0500] "GET / HTTP/1.0" 403 985 "-" "check_http/v2.1.4 (nagios-plugins 2.1.4)"
127.0.0.1 - - [23/Jan/2017:15:06:27 -0500] "GET / HTTP/1.0" 403 985 "-" "check_http/v2.1.4 (nagios-plugins 2.1.4)"
127.0.0.1 - - [23/Jan/2017:15:11:27 -0500] "GET / HTTP/1.0" 403 985 "-" "check_http/v2.1.4 (nagios-plugins 2.1.4)"
127.0.0.1 - - [23/Jan/2017:15:58:01 -0500] "GET / HTTP/1.0" 403 985 "-" "check_http/v2.1.4 (nagios-plugins 2.1.4)"
127.0.0.1 - - [23/Jan/2017:19:14:25 -0500] "GET / HTTP/1.0" 403 985 "-" "check_http/v2.1.4 (nagios-plugins 2.1.4)"
127.0.0.1 - - [23/Jan/2017:19:19:25 -0500] "GET / HTTP/1.0" 403 985 "-" "check_http/v2.1.4 (nagios-plugins 2.1.4)"
127.0.0.1 - - [23/Jan/2017:19:24:25 -0500] "GET / HTTP/1.0" 403 985 "-" "check_http/v2.1.4 (nagios-plugins 2.1.4)"
127.0.0.1 - - [23/Jan/2017:19:29:25 -0500] "GET / HTTP/1.0" 403 985 "-" "check_http/v2.1.4 (nagios-plugins 2.1.4)"
127.0.0.1 - - [23/Jan/2017:19:34:25 -0500] "GET / HTTP/1.0" 403 985 "-" "check_http/v2.1.4 (nagios-plugins 2.1.4)"
127.0.0.1 - - [23/Jan/2017:19:39:25 -0500] "GET / HTTP/1.0" 403 985 "-" "check_http/v2.1.4 (nagios-plugins 2.1.4)"
127.0.0.1 - - [23/Jan/2017:19:44:25 -0500] "GET / HTTP/1.0" 403 985 "-" "check_http/v2.1.4 (nagios-plugins 2.1.4)"
127.0.0.1 - - [23/Jan/2017:19:49:25 -0500] "GET / HTTP/1.0" 403 985 "-" "check_http/v2.1.4 (nagios-plugins 2.1.4)"
127.0.0.1 - - [23/Jan/2017:19:54:25 -0500] "GET / HTTP/1.0" 403 985 "-" "check_http/v2.1.4 (nagios-plugins 2.1.4)"
127.0.0.1 - - [23/Jan/2017:19:59:25 -0500] "GET / HTTP/1.0" 403 985 "-" "check_http/v2.1.4 (nagios-plugins 2.1.4)"
127.0.0.1 - - [23/Jan/2017:20:04:25 -0500] "GET / HTTP/1.0" 403 985 "-" "check_http/v2.1.4 (nagios-plugins 2.1.4)"
127.0.0.1 - - [23/Jan/2017:20:09:25 -0500] "GET / HTTP/1.0" 403 985 "-" "check_http/v2.1.4 (nagios-plugins 2.1.4)"
Error log :

Code: Select all

AH00557: httpd-prefork: apr_sockaddr_info_get() failed for linux-2swl
AH00558: httpd-prefork: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
[Sat Jan 21 11:16:21.793580 2017] [ssl:warn] [pid 40267] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Sat Jan 21 11:16:21.800914 2017] [mpm_prefork:notice] [pid 40267] AH00163: Apache/2.4.23 (Linux/SUSE) OpenSSL/1.0.2j-fips configured -- resuming normal operations
[Sat Jan 21 11:16:21.800945 2017] [core:notice] [pid 40267] AH00094: Command line: '/usr/sbin/httpd-prefork -f /etc/apache2/httpd.conf -D SYSCONFIG -C PidFile /var/run/httpd.pid -C Include /etc/apache2/sysconfig.d/ -D SYSTEMD -D FOREGROUND'
[Sat Jan 21 11:20:01.286958 2017] [mpm_prefork:notice] [pid 40267] AH00169: caught SIGTERM, shutting down
AH00557: httpd-prefork: apr_sockaddr_info_get() failed for linux-2swl
AH00558: httpd-prefork: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
[Sat Jan 21 11:22:17.984359 2017] [ssl:warn] [pid 43589] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Sat Jan 21 11:22:17.991350 2017] [mpm_prefork:notice] [pid 43589] AH00163: Apache/2.4.23 (Linux/SUSE) OpenSSL/1.0.2j-fips configured -- resuming normal operations
[Sat Jan 21 11:22:17.991378 2017] [core:notice] [pid 43589] AH00094: Command line: '/usr/sbin/httpd-prefork -f /etc/apache2/httpd.conf -D SYSCONFIG -C PidFile /var/run/httpd.pid -C Include /etc/apache2/sysconfig.d/ -D SYSTEMD -D FOREGROUND'
[Sat Jan 21 11:38:46.256222 2017] [autoindex:error] [pid 43598] [client ::1:39212] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var,index.php4,index.php5,index.php) found, and server-generated directory index forbidden by Options directive
[Sat Jan 21 11:38:58.587089 2017] [access_compat:error] [pid 43598] [client ::1:39212] AH01797: client denied by server configuration: /usr/local/nagios/share
[Sat Jan 21 11:39:04.929196 2017] [access_compat:error] [pid 43598] [client ::1:39212] AH01797: client denied by server configuration: /usr/local/nagios/share
[Sat Jan 21 11:40:53.163691 2017] [access_compat:error] [pid 43599] [client ::1:39222] AH01797: client denied by server configuration: /usr/local/nagios/share
[Sat Jan 21 11:41:20.478851 2017] [access_compat:error] [pid 43600] [client ::1:39238] AH01797: client denied by server configuration: /usr/local/nagios/share
[Sat Jan 21 11:57:43.872211 2017] [mpm_prefork:notice] [pid 43589] AH00170: caught SIGWINCH, shutting down gracefully
AH00557: httpd-prefork: apr_sockaddr_info_get() failed for linux-2swl
AH00558: httpd-prefork: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
[Sat Jan 21 12:40:16.937724 2017] [ssl:warn] [pid 2721] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Sat Jan 21 12:40:16.960663 2017] [mpm_prefork:notice] [pid 2721] AH00163: Apache/2.4.23 (Linux/SUSE) OpenSSL/1.0.2j-fips configured -- resuming normal operations
[Sat Jan 21 12:40:16.960695 2017] [core:notice] [pid 2721] AH00094: Command line: '/usr/sbin/httpd-prefork -f /etc/apache2/httpd.conf -D SYSCONFIG -C PidFile /var/run/httpd.pid -C Include /etc/apache2/sysconfig.d/ -D SYSTEMD -D FOREGROUND'
[Sat Jan 21 12:40:35.576627 2017] [autoindex:error] [pid 2730] [client ::1:54872] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var,index.php4,index.php5,index.php) found, and server-generated directory index forbidden by Options directive, referer: http://localhost/nagios
[Sat Jan 21 15:05:12.593168 2017] [mpm_prefork:notice] [pid 2721] AH00170: caught SIGWINCH, shutting down gracefully
[Sat Jan 21 15:05:12.750527 2017] [so:warn] [pid 3199] AH01574: module php5_module is already loaded, skipping
AH00557: httpd-prefork: apr_sockaddr_info_get() failed for linux-2swl
AH00558: httpd-prefork: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
[Sat Jan 21 15:05:12.819710 2017] [ssl:warn] [pid 3199] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Sat Jan 21 15:05:12.826263 2017] [mpm_prefork:notice] [pid 3199] AH00163: Apache/2.4.23 (Linux/SUSE) OpenSSL/1.0.2j-fips configured -- resuming normal operations
[Sat Jan 21 15:05:12.826295 2017] [core:notice] [pid 3199] AH00094: Command line: '/usr/sbin/httpd-prefork -f /etc/apache2/httpd.conf -D SYSCONFIG -C PidFile /var/run/httpd.pid -C Include /etc/apache2/sysconfig.d/ -D SYSTEMD -D FOREGROUND'
[Sat Jan 21 15:05:33.035717 2017] [access_compat:error] [pid 3208] [client ::1:54922] AH01797: client denied by server configuration: /usr/local/nagios/share
[Sat Jan 21 15:05:41.731813 2017] [autoindex:error] [pid 3208] [client ::1:54922] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var,index.php4,index.php5,index.php) found, and server-generated directory index forbidden by Options directive
[Sat Jan 21 15:07:56.508217 2017] [mpm_prefork:notice] [pid 3199] AH00170: caught SIGWINCH, shutting down gracefully
[Sat Jan 21 15:07:57.006889 2017] [so:warn] [pid 3595] AH01574: module php5_module is already loaded, skipping
AH00557: httpd-prefork: apr_sockaddr_info_get() failed for linux-2swl
AH00558: httpd-prefork: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
[Sat Jan 21 15:07:57.467141 2017] [ssl:warn] [pid 3595] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Sat Jan 21 15:07:57.477577 2017] [mpm_prefork:notice] [pid 3595] AH00163: Apache/2.4.23 (Linux/SUSE) OpenSSL/1.0.2j-fips configured -- resuming normal operations
[Sat Jan 21 15:07:57.477607 2017] [core:notice] [pid 3595] AH00094: Command line: '/usr/sbin/httpd-prefork -f /etc/apache2/httpd.conf -D SYSCONFIG -C PidFile /var/run/httpd.pid -C Include /etc/apache2/sysconfig.d/ -D SYSTEMD -D FOREGROUND'
[Sat Jan 21 15:08:18.428060 2017] [access_compat:error] [pid 3605] [client ::1:54970] AH01797: client denied by server configuration: /usr/local/nagios/share
[Sat Jan 21 15:20:37.715889 2017] [access_compat:error] [pid 3607] [client ::1:54976] AH01797: client denied by server configuration: /usr/local/nagios/share
[Sat Jan 21 15:20:44.819512 2017] [access_compat:error] [pid 3607] [client ::1:54976] AH01797: client denied by server configuration: /usr/local/nagios/share
[Sat Jan 21 15:28:59.615568 2017] [access_compat:error] [pid 3608] [client ::1:54978] AH01797: client denied by server configuration: /usr/local/nagios/share
[Sat Jan 21 17:11:57.022577 2017] [so:warn] [pid 2712] AH01574: module php5_module is already loaded, skipping
AH00557: httpd-prefork: apr_sockaddr_info_get() failed for linux-2swl
AH00558: httpd-prefork: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
[Sat Jan 21 17:11:57.157380 2017] [ssl:warn] [pid 2712] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Sat Jan 21 17:11:57.227580 2017] [mpm_prefork:notice] [pid 2712] AH00163: Apache/2.4.23 (Linux/SUSE) OpenSSL/1.0.2j-fips configured -- resuming normal operations
[Sat Jan 21 17:11:57.227610 2017] [core:notice] [pid 2712] AH00094: Command line: '/usr/sbin/httpd-prefork -f /etc/apache2/httpd.conf -D SYSCONFIG -C PidFile /var/run/httpd.pid -C Include /etc/apache2/sysconfig.d/ -D SYSTEMD -D FOREGROUND'
[Sat Jan 21 17:15:08.015998 2017] [access_compat:error] [pid 2720] [client ::1:42254] AH01797: client denied by server configuration: /usr/local/nagios/share
[Sat Jan 21 18:35:22.949967 2017] [access_compat:error] [pid 2721] [client ::1:42274] AH01797: client denied by server configuration: /usr/local/nagios/share
[Sat Jan 21 18:38:36.435833 2017] [mpm_prefork:notice] [pid 2712] AH00170: caught SIGWINCH, shutting down gracefully
[Sat Jan 21 18:38:36.630226 2017] [so:warn] [pid 3049] AH01574: module php5_module is already loaded, skipping
AH00557: httpd-prefork: apr_sockaddr_info_get() failed for linux-2swl
AH00558: httpd-prefork: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
[Sat Jan 21 18:38:36.698019 2017] [ssl:warn] [pid 3049] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Sat Jan 21 18:38:36.704440 2017] [mpm_prefork:notice] [pid 3049] AH00163: Apache/2.4.23 (Linux/SUSE) OpenSSL/1.0.2j-fips configured -- resuming normal operations
[Sat Jan 21 18:38:36.704475 2017] [core:notice] [pid 3049] AH00094: Command line: '/usr/sbin/httpd-prefork -f /etc/apache2/httpd.conf -D SYSCONFIG -C PidFile /var/run/httpd.pid -C Include /etc/apache2/sysconfig.d/ -D SYSTEMD -D FOREGROUND'
[Sat Jan 21 18:38:57.237035 2017] [access_compat:error] [pid 3059] [client ::1:42300] AH01797: client denied by server configuration: /usr/local/nagios/share
[Sat Jan 21 18:40:27.438486 2017] [access_compat:error] [pid 3060] [client ::1:42302] AH01797: client denied by server configuration: /usr/local/nagios/share/index.php
[Sun Jan 22 10:55:34.840177 2017] [so:warn] [pid 6084] AH01574: module php5_module is already loaded, skipping
AH00557: httpd-prefork: apr_sockaddr_info_get() failed for linux-2swl
AH00558: httpd-prefork: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
[Sun Jan 22 10:55:34.888997 2017] [ssl:warn] [pid 6084] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Sun Jan 22 10:55:34.936238 2017] [mpm_prefork:notice] [pid 6084] AH00163: Apache/2.4.23 (Linux/SUSE) OpenSSL/1.0.2j-fips configured -- resuming normal operations
[Sun Jan 22 10:55:34.936266 2017] [core:notice] [pid 6084] AH00094: Command line: '/usr/sbin/httpd-prefork -f /etc/apache2/httpd.conf -D SYSCONFIG -C PidFile /var/run/httpd.pid -C Include /etc/apache2/sysconfig.d/ -D SYSTEMD -D FOREGROUND'
[Sun Jan 22 10:56:13.733434 2017] [access_compat:error] [pid 6095] [client ::1:46528] AH01797: client denied by server configuration: /usr/local/nagios/share
[Mon Jan 23 14:21:38.225504 2017] [access_compat:error] [pid 6096] [client ::1:46716] AH01797: client denied by server configuration: /usr/local/nagios/share
[Mon Jan 23 14:22:10.494859 2017] [access_compat:error] [pid 6097] [client ::1:46718] AH01797: client denied by server configuration: /usr/local/nagios/share
[Mon Jan 23 14:22:15.169277 2017] [autoindex:error] [pid 6097] [client ::1:46718] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var,index.php4,index.php5,index.php) found, and server-generated directory index forbidden by Options directive
[Mon Jan 23 14:23:32.852347 2017] [mpm_prefork:notice] [pid 6084] AH00170: caught SIGWINCH, shutting down gracefully
[Mon Jan 23 14:38:27.901223 2017] [so:warn] [pid 49685] AH01574: module php5_module is already loaded, skipping
AH00557: httpd-prefork: apr_sockaddr_info_get() failed for linux-2swl
AH00558: httpd-prefork: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
[Mon Jan 23 14:38:27.948638 2017] [ssl:warn] [pid 49685] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Mon Jan 23 14:38:27.955917 2017] [mpm_prefork:notice] [pid 49685] AH00163: Apache/2.4.23 (Linux/SUSE) OpenSSL/1.0.2j-fips configured -- resuming normal operations
[Mon Jan 23 14:38:27.955961 2017] [core:notice] [pid 49685] AH00094: Command line: '/usr/sbin/httpd-prefork -f /etc/apache2/httpd.conf -D SYSCONFIG -C PidFile /var/run/httpd.pid -C Include /etc/apache2/sysconfig.d/ -D SYSTEMD -D FOREGROUND'
[Mon Jan 23 14:39:54.944069 2017] [access_compat:error] [pid 49694] [client ::1:46720] AH01797: client denied by server configuration: /usr/local/nagios/share
[Mon Jan 23 14:40:26.579974 2017] [access_compat:error] [pid 49695] [client ::1:46738] AH01797: client denied by server configuration: /usr/local/nagios/share
[Mon Jan 23 14:41:27.635741 2017] [autoindex:error] [pid 49696] [client 127.0.0.1:47060] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var,index.php4,index.php5,index.php) found, and server-generated directory index forbidden by Options directive
[Mon Jan 23 14:46:27.614132 2017] [autoindex:error] [pid 49697] [client 127.0.0.1:47064] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var,index.php4,index.php5,index.php) found, and server-generated directory index forbidden by Options directive
[Mon Jan 23 14:51:27.592204 2017] [autoindex:error] [pid 49698] [client 127.0.0.1:47074] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var,index.php4,index.php5,index.php) found, and server-generated directory index forbidden by Options directive
[Mon Jan 23 14:56:27.569575 2017] [autoindex:error] [pid 49809] [client 127.0.0.1:47078] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var,index.php4,index.php5,index.php) found, and server-generated directory index forbidden by Options directive
[Mon Jan 23 14:57:51.115478 2017] [access_compat:error] [pid 49694] [client ::1:46766] AH01797: client denied by server configuration: /usr/local/nagios/share
[Mon Jan 23 15:01:27.546973 2017] [autoindex:error] [pid 49695] [client 127.0.0.1:47084] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var,index.php4,index.php5,index.php) found, and server-generated directory index forbidden by Options directive
[Mon Jan 23 15:06:27.525176 2017] [autoindex:error] [pid 49696] [client 127.0.0.1:47088] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var,index.php4,index.php5,index.php) found, and server-generated directory index forbidden by Options directive
[Mon Jan 23 15:11:27.502499 2017] [autoindex:error] [pid 49697] [client 127.0.0.1:47092] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var,index.php4,index.php5,index.php) found, and server-generated directory index forbidden by Options directive
[Mon Jan 23 15:58:01.022573 2017] [autoindex:error] [pid 49698] [client 127.0.0.1:47164] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var,index.php4,index.php5,index.php) found, and server-generated directory index forbidden by Options directive
[Mon Jan 23 19:14:25.442426 2017] [autoindex:error] [pid 49809] [client 127.0.0.1:47176] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var,index.php4,index.php5,index.php) found, and server-generated directory index forbidden by Options directive
[Mon Jan 23 19:19:25.420049 2017] [autoindex:error] [pid 49694] [client 127.0.0.1:47180] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var,index.php4,index.php5,index.php) found, and server-generated directory index forbidden by Options directive
[Mon Jan 23 19:24:25.397572 2017] [autoindex:error] [pid 49695] [client 127.0.0.1:47184] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var,index.php4,index.php5,index.php) found, and server-generated directory index forbidden by Options directive
[Mon Jan 23 19:29:25.375705 2017] [autoindex:error] [pid 49696] [client 127.0.0.1:47188] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var,index.php4,index.php5,index.php) found, and server-generated directory index forbidden by Options directive
[Mon Jan 23 19:34:25.354587 2017] [autoindex:error] [pid 49697] [client 127.0.0.1:47192] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var,index.php4,index.php5,index.php) found, and server-generated directory index forbidden by Options directive
[Mon Jan 23 19:39:25.333003 2017] [autoindex:error] [pid 49698] [client 127.0.0.1:47200] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var,index.php4,index.php5,index.php) found, and server-generated directory index forbidden by Options directive
[Mon Jan 23 19:44:25.314692 2017] [autoindex:error] [pid 49809] [client 127.0.0.1:47204] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var,index.php4,index.php5,index.php) found, and server-generated directory index forbidden by Options directive
[Mon Jan 23 19:49:25.298842 2017] [autoindex:error] [pid 49694] [client 127.0.0.1:47208] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var,index.php4,index.php5,index.php) found, and server-generated directory index forbidden by Options directive
[Mon Jan 23 19:54:25.276327 2017] [autoindex:error] [pid 49695] [client 127.0.0.1:47212] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var,index.php4,index.php5,index.php) found, and server-generated directory index forbidden by Options directive
[Mon Jan 23 19:59:25.254923 2017] [autoindex:error] [pid 49696] [client 127.0.0.1:47216] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var,index.php4,index.php5,index.php) found, and server-generated directory index forbidden by Options directive
[Mon Jan 23 20:04:25.232810 2017] [autoindex:error] [pid 49697] [client 127.0.0.1:47220] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var,index.php4,index.php5,index.php) found, and server-generated directory index forbidden by Options directive
[Mon Jan 23 20:09:25.210519 2017] [autoindex:error] [pid 49698] [client 127.0.0.1:47228] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var,index.php4,index.php5,index.php) found, and server-generated directory index forbidden by Options directive
[Mon Jan 23 20:14:05.683617 2017] [access_compat:error] [pid 49809] [client 192.168.1.29:50644] AH01797: client denied by server configuration: /usr/local/nagios/share
[Mon Jan 23 20:14:25.188045 2017] [autoindex:error] [pid 49694] [client 127.0.0.1:47242] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var,index.php4,index.php5,index.php) found, and server-generated directory index forbidden by Options directive
[Mon Jan 23 20:19:25.165658 2017] [autoindex:error] [pid 49695] [client 127.0.0.1:47246] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var,index.php4,index.php5,index.php) found, and server-generated directory index forbidden by Options directive
[Mon Jan 23 20:24:25.143026 2017] [autoindex:error] [pid 49696] [client 127.0.0.1:47250] AH01276: Cannot serve directory /srv/www/htdocs/: No matching DirectoryIndex (index.html,index.html.var,index.php4,index.php5,index.php) found, and server-generated directory index forbidden by Options directive
Thanks!
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: 403 error on openSUSE 42.2

Post by mcapra »

Can you share the output of:

Code: Select all

apachectl -M
Can you also edit your /etc/apache2/conf.d/nagios.conf to the following:

Code: Select all

# 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
      <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>
</Directory>

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

<Directory "/usr/local/nagios/share">
#  SSLRequireSSL
   Options None
   AllowOverride None
      <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>
</Directory>
And restart the apache2 service? If it fails, share the output of:

Code: Select all

systemctl status apache2.service
Former Nagios employee
https://www.mcapra.com/
CMOS
Posts: 13
Joined: Sun Jan 22, 2017 6:57 am

Re: 403 error on openSUSE 42.2

Post by CMOS »

Ouput of apachetcl :

Code: Select all

[Wed Jan 25 18:36:06.220367 2017] [so:warn] [pid 3157] AH01574: module php5_modu                                                                                        le is already loaded, skipping
Loaded Modules:
 core_module (static)
 so_module (static)
 http_module (static)
 mpm_prefork_module (static)
 unixd_module (static)
 systemd_module (static)
 actions_module (shared)
 alias_module (shared)
 auth_basic_module (shared)
 authn_file_module (shared)
 authz_host_module (shared)
 authz_groupfile_module (shared)
 authz_core_module (shared)
 authz_user_module (shared)
 autoindex_module (shared)
 cgi_module (shared)
 dir_module (shared)
 env_module (shared)
 expires_module (shared)
 include_module (shared)
 log_config_module (shared)
 mime_module (shared)
 negotiation_module (shared)
 setenvif_module (shared)
 ssl_module (shared)
 socache_shmcb_module (shared)
 userdir_module (shared)
 reqtimeout_module (shared)
 php5_module (shared)
 authn_core_module (shared)
 access_compat_module (shared)
 version_module (shared)
Modified nagios.conf and restarted apache2 service and restarted without issue. No change to the 403 error.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: 403 error on openSUSE 42.2

Post by mcapra »

Can you share the contents of your /etc/apache/httpd.conf file?
Former Nagios employee
https://www.mcapra.com/
Locked