Hmm. Seems I'm unable to apply configuration anymore since i changed the nagiosxi.conf
Code: Select all
Command submitted for processing...
Waiting for configuration verification.........................................................................................................................................................................
Tailing cmdsubsys.log shows:
Code: Select all
PROCESSED 0 COMMANDS
CONFIG...
CMDLINE=cd /usr/local/nagiosxi/scripts && ./reconfigure_nagios.sh
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE
--2015-08-11 19:47:06-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:80... connected.
HTTP request sent, awaiting response... 403 Forbidden
2015-08-11 19:47:06 ERROR 403: Forbidden.
/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'submit=Login&hidelog=true&loginSubmitted=true&username=nagiosxi&password=n@gweb' -O nagiosql.loginNAGIOSQL LOGIN FAILED!
OUTPUT=/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'submit=Login&hidelog=true&loginSubmitted=true&username=nagiosxi&password=n@gweb' -O nagiosql.loginNAGIOSQL LOGIN FAILED!
RETURNCODE=2
.......................................................tail: /usr/local/nagiosxi/var/cmdsubsys.log: file truncated
PROCESSED 1 COMMANDS
tail: /usr/local/nagiosxi/var/cmdsubsys.log: file truncated
PROCESSED 0 COMMANDS
tail: /usr/local/nagiosxi/var/cmdsubsys.log: file truncated
.
PROCESSED 0 COMMANDS
tail: /usr/local/nagiosxi/var/cmdsubsys.log: file truncated
..
PROCESSED 0 COMMANDS
2015-08-11 19:47:06 ERROR 403: Forbidden. clearly is the issue and related to the change in /etc/httpd/conf.d/nagiosxi.conf I did to try secure the nagiosxi instance.
Anyone knows what I can do allow Nagios XI to apply configuration while keeping the deny from all and allow from config in /etc/httpd/conf.d/nagiosxi.conf ?
Code: Select all
<Directory "/usr/local/nagiosxi/html">
# SSLRequireSSL
Options None
AllowOverride None
# Order allow,deny
# Allow from all
Order deny,allow
Deny from all
Allow from 102.22.50.45 102.22.37.130 102.27.33.70 127.0.0.1 222.71.234.84 2a01:fe00::f43c:91ff:fe18:6141
# AuthName "Nagios XI"
# AuthType Basic
# AuthUserFile /usr/local/nagiosxi/etc/htpasswd.users
# Require valid-user
Require all granted
</Directory>
Alias /nagiosxi "/usr/local/nagiosxi/html"
I added localhost 127.0.0.1, the server's own ipv4, ipv6 link and global address, so it should be allowed to access itself? When I revert to the normal (non-secure) situation it works normally.