Nagiosxi - https access

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
paul.jobb
Posts: 167
Joined: Tue Aug 02, 2011 4:37 pm

Nagiosxi - https access

Post by paul.jobb »

Hi;

I have implemented https per the instructions posted on the site and that is working fine, I tried adding the following to rewrite the url to https in the /etc/httpd/conf.d/nagiosxi.conf

<VirtualHost *:80> # Add this line
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
<Directory "/usr/local/nagiosxi/html">

that works with the exception of causing apply configuration to fail. Would you be able to suggest how I might implement a url rewrite? since I am using active directory for login I am primarily just concerned about securing the login page. Presently we are on the Nagios XI 2012R1.6 release.

Thanks,
Paul
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Nagiosxi - https access

Post by abrist »

Double check to make sure you set the "server protocol" dropdown on the "configure nagiosql settings" page to "https" per the final page of the following document:
http://assets.nagios.com/downloads/nagi ... ios_XI.pdf
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
paul.jobb
Posts: 167
Joined: Tue Aug 02, 2011 4:37 pm

Re: Nagiosxi - https access

Post by paul.jobb »

yes that is set. If I don't have the rewrite options in the nagiosxi.conf file and am using https the apply works fine, once those are there the apply appears to fail.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Nagiosxi - https access

Post by sreinhardt »

I can't say I've seen it applied in the nagios.conf file. Have you tried moving this to a separate file so that it is globally applied to apache? I can verify that this is working on my end, all config modifications seem to be fine.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
paul.jobb
Posts: 167
Joined: Tue Aug 02, 2011 4:37 pm

Re: Nagiosxi - https access

Post by paul.jobb »

I seem to have gotten it to work so that I can redirect http to https and the apply config still runs

I Modified the /etc/httpd/conf.d/nagiosxi.conf file to as follows, commented out the Options None and changed AllowOverride to All

#NameVirtualHost *:443
<VirtualHost *:80>
<Directory "/usr/local/nagiosxi/html">
## SSLRequireSSL
# Options None
#AllowOverride None
AllowOverride All
Order allow,deny
Allow from all
## Order deny,allow
## Deny from all
## Allow from 127.0.0.1
## AuthName "Nagios XI"
## AuthType Basic
## AuthUserFile /usr/local/nagiosxi/etc/htpasswd.users
## Require valid-user
</Directory>
</VirtualHost>

<VirtualHost *:443>
SSLEngine on
SSLCertificateFile /etc/pki/tls/certs/ca.cer
SSLCertificateKeyFile /etc/pki/tls/private/ca.key
<Directory "/usr/local/nagiosxi/html">
AllowOverride All
</Directory>
</VirtualHost>
Alias /nagiosxi "/usr/local/nagiosxi/html"

then I created an .htaccess file in /usr/local/nagiosxi/html and added the following lines to it

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Nagiosxi - https access

Post by sreinhardt »

Interesting, thanks for letting us know!
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Locked