Proxypass with NagiosNA

This support forum board is for support questions relating to Nagios Network Analyzer, our network traffic and bandwidth analysis solution.
balothia
Posts: 68
Joined: Sun Dec 08, 2013 10:25 am

Proxypass with NagiosNA

Post by balothia »

Hi,

I was trying to configure Proxypass with NagiosNa but looks like it cannot be done. Almost all links are displayed with IP Address of NNA. Is there any way we can achieve this. I believe this is there in almost all Nagios product.

Thanks,
Gautam
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Proxypass with NagiosNA

Post by sreinhardt »

What about proxypass\mod_proxy is causing an issue? I am not aware of it having issues displaying IPs via it, but I am also generally a mod_security guy instead.
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.
balothia
Posts: 68
Joined: Sun Dec 08, 2013 10:25 am

Re: Proxypass with NagiosNA

Post by balothia »

Not sure its a mod_proxy issue. When I do a proxypass, I use to get NagiosNA login screen but when I click on login, it tries to connect to actual nagiosna server directly instead on using proxypass.

Thanks,
Gautam
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Proxypass with NagiosNA

Post by sreinhardt »

Could you share your apache configs for NNA? Feel free to sanatize if needed, but I think that would be the best start.
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.
balothia
Posts: 68
Joined: Sun Dec 08, 2013 10:25 am

Re: Proxypass with NagiosNA

Post by balothia »

I dont see much on NagiosNA config. Here it is what i have.

Alias /nagiosna "/var/www/html/nagiosna/www/"

<Directory "/var/www/html/nagiosna/www/">
# SSLRequireSSL
Options None
AllowOverride None
Order allow,deny
Allow from all

</Directory>
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Proxypass with NagiosNA

Post by lmiltchev »

I was trying to configure Proxypass with NagiosNa but looks like it cannot be done.
Can you describe in details all of the steps you took to achieve this? You can post configs, screenshots, etc. Hide the sensitive info.
Be sure to check out our Knowledgebase for helpful articles and solutions!
balothia
Posts: 68
Joined: Sun Dec 08, 2013 10:25 am

Re: Proxypass with NagiosNA

Post by balothia »

Hi,

ProxyPass /nagiosna/ http://x.x.x.x/nagiosna/
ProxyPassReverse /nagiosna/ http://x.x.x.x/nagiosna/

1.) NagiosNA opens with proxypass
2.) But when I login, the page leaves the proxypass apache server goes to the actual NagiosNA server.
3.) So after proxypass I am only able to open the index page after that it goes to real NagiosNA server.

The request should not leave the proxypass apache server. I tried proxypass with our other applications and its working fine.

I have attached the screen shots in word document.

Thanks,
Gautam
You do not have the required permissions to view the files attached to this post.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Proxypass with NagiosNA

Post by sreinhardt »

You would probably need to use mod_rewrite as well or something similar to force the nna server to cause a link rename. This might also be done on the proxypass server, but not sure. This is definitely outside of anything standard.
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.
balothia
Posts: 68
Joined: Sun Dec 08, 2013 10:25 am

Re: Proxypass with NagiosNA

Post by balothia »

sreinhardt wrote:You would probably need to use mod_rewrite as well or something similar to force the nna server to cause a link rename. This might also be done on the proxypass server, but not sure. This is definitely outside of anything standard.
I tried mod_rewrite already, its not working. The reason once you click login the request goes to NNA server instead of proxypass apache server. So if request is not received on proxypass server mod_rewrite will not work.
Do we have any other way to do it?

Thanks,
Gautam
jomann
Development Lead
Posts: 611
Joined: Mon Apr 22, 2013 10:06 am
Location: Nagios Enterprises

Re: Proxypass with NagiosNA

Post by jomann »

I believe the reason this is happening for you is because NNA uses a Framework that creates the URLs that we output based a config setting that gets automatically set. It seems to not be updating it for whatever reason. Can you confirm that when you view the source for the NNA login page that it is showing your NNA server's IP Address as the location it is going after you click the login button you should find it inside the <form action="">. This could be an issue with the config settings for getting that URL created.

Here is a possible fix:
Go to the following file and update the settings...

Code: Select all

/var/www/html/nagiosna/application/config/config.local.php
Update the following:

Code: Select all

// base url of site
$config['site_url'] = '//'.$_SERVER['HTTP_HOST'].'/nagiosna';
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked