Yes you are correct, in form action I can see the nagiosna server ip address.
In the config file this is exactly what I can see.
// base url of site
$config['site_url'] = '//'.$_SERVER['HTTP_HOST'].'/nagiosna';
What needs to be updated here?
Thanks
Gautam
Proxypass with NagiosNA
Re: Proxypass with NagiosNA
You'll need to set that to whatever your proxypass URL is going to be - basically this "site_url" variable is setting the links up for us so we do this:
site_url('sources')
will output http://<ip address>/nagiosna/index.php/sources
So if we change to:
$config['site_url'] = '//mynagiosnaserver/nagiosna';
you'll get http://mynagiosnaserver/nagiosna/index.php/sources
site_url('sources')
will output http://<ip address>/nagiosna/index.php/sources
So if we change to:
$config['site_url'] = '//mynagiosnaserver/nagiosna';
you'll get http://mynagiosnaserver/nagiosna/index.php/sources
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Proxypass with NagiosNA
I am not sure that should be the case because if I hardcode the proxypass IP, then not sure i will be able to access the nagiosna server URL locally.
What about if I change it to:
$config['site_url'] = '/nagiosna';
So IP Address should automatically append here, it should be dynamic. Just a thought.
Thanks,
Gautam
What about if I change it to:
$config['site_url'] = '/nagiosna';
So IP Address should automatically append here, it should be dynamic. Just a thought.
Thanks,
Gautam
-
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: Proxypass with NagiosNA
You are correct, this would likely force you to always connect via proxy pass. However if you do not wish to do that, your alterations will have to happen on the proxy pass server, and actually modify the html that is sent back to the client system. You can certainly try just /nagiosna, however due to php generating the links, this may cause a http:///nagiosna 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.
Re: Proxypass with NagiosNA
I tried with REMOTE_ADDR option instead of HTTP_HOST, it didnt worked. But I found the answer, with the proxypass the Proxypass's host ipaddress was not getting passed which was confusing and PHP was picking the IP Address used to Proxypass, which is a NagiosNA server IP Address. The answer to this solution is ProxyPreserveHost, if we have this parameter on with proxypass, the proxypass configuration will just work fine.
I tested it and this is working fine for till now.
Thanks,
Gautam
I tested it and this is working fine for till now.
Thanks,
Gautam
-
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: Proxypass with NagiosNA
Cool, glad its working! Locking it up.
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.