Page 1 of 1

Nagios XI using Apache proxy

Posted: Mon May 16, 2016 1:13 pm
by markbe
Hello,

I want to setup NagiosXI to be accessed through an Apache proxy. The Nagios XI, landing page show up fine but when I click the link to login, the page where you can enter the user credentials doesn't apply the stylesheet. If I actually log in all other pages aren't useable because the stylesheet isn't applied as well.
When I connect using the IP of the server. bypassing the proxy all works fine.

Any ideas?

This is my vhost configuraation

Code: Select all

<VirtualHost *:80>
        ServerName nagios.xyz.com
        RewriteEngine On
        RewriteCond %{HTTPS} off
        RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
        ErrorLog ${APACHE_LOG_DIR}/error_proxy_NAGIOS.log
        LogLevel warn
        CustomLog ${APACHE_LOG_DIR}/access_proxy.log combined
</VirtualHost>

<VirtualHost *:443>
        ServerName nagios.xyz.com
        ProxyPass /icons !
        ProxyPass /logs !
        SSLEngine on
        SSLProxyVerify none
        SSLProxyCheckPeerCN off
        SSLProxyCheckPeerName off
        SSLProxyCheckPeerExpire off
        SSLProxyEngine On
        SSLCertificateChainFile /etc/apache2/ssl/xyz_intermediate.crt
        SSLCertificateFile /etc/apache2/ssl/xyz.com.cer
        SSLCertificateKeyFile /etc/apache2/ssl/xyz.com.key
        ProxyRequests     Off
        ProxyPreserveHost On
        ProxyPass / http://172.16.250.10:80/
        ProxyPassReverse / http://172.16.250.10:80/

        DocumentRoot /var/www
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /var/www/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>
        ErrorLog ${APACHE_LOG_DIR}/error_proxy_NAGIOS_SSL.log
        LogLevel warn
        CustomLog ${APACHE_LOG_DIR}/access_proxy_SSL.log combined
</VirtualHost>
Thanks
Mark

Re: Nagios XI using Apache proxy

Posted: Mon May 16, 2016 2:28 pm
by bwallace
Perhaps you could refer to this forum , but note that Nagios Core was being used there, not XI.
https://support.nagios.com/forum/viewto ... =7&t=27604

I suspect you'll have to add items to 'ProxyPass' but as for just what needs to be added, best to tail the apache logs while reproducing, and go from there...

Code: Select all

tail -50 /var/log/httpd/error_log
tail -50 /var/log/httpd/access_log
If any questions, feel free to post the output here - thanks -