Page 2 of 2

Re: Proxypass with NagiosNA

Posted: Wed Feb 19, 2014 9:46 am
by balothia
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

Re: Proxypass with NagiosNA

Posted: Wed Feb 19, 2014 10:21 am
by jomann
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

Re: Proxypass with NagiosNA

Posted: Wed Feb 19, 2014 2:18 pm
by balothia
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

Re: Proxypass with NagiosNA

Posted: Wed Feb 19, 2014 3:15 pm
by sreinhardt
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.

Re: Proxypass with NagiosNA

Posted: Wed Feb 19, 2014 4:24 pm
by balothia
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

Re: Proxypass with NagiosNA

Posted: Wed Feb 19, 2014 5:02 pm
by sreinhardt
Cool, glad its working! Locking it up.