Page 1 of 1
how without /nagios
Posted: Sat Feb 16, 2019 12:49 pm
by Mansaylon
Hi
I've configured Apache to call Nagios like this: nag.domain.com (without /nagios)
A redirect automatically redirects to https://
So far, almost everything works.
Only 'Map' and 'Trends' only work if I call it with /nagios.
Map works:
http://nag.domain.com
http://nag.domain.co/nagios
https://nag.domain.com/nagios
Map do not work:
https://nag.domain.com
What did I forget or did wrong?
Bye
Mansaylon
Re: how without /nagios
Posted: Mon Feb 18, 2019 2:49 pm
by mcapra
Could you clarify which product you're using? You've posted in the
Nagios XI section, but the URLs you reference are for
Nagios Core.
Could you share the relevant Apache configurations you're using to make this change?
Assuming Nagios Core, the only major difference I see in the Map and Trends links is that they use relative URLs that aren't impacted by how
cgi_base_url is evaluated:
https://github.com/NagiosEnterprises/na ... de.php#L40
https://github.com/NagiosEnterprises/na ... de.php#L89
If they're not working, my guess is the vhosts/rewrites/directories and other Apache level stuff needs tuning. That's kinda out of scope of what is normally provided support-wise as it represents a non-standard Apache configuration -- It's strictly an Apache problem, not a Nagios Core problem.
Re: how without /nagios
Posted: Mon Feb 18, 2019 3:57 pm
by cdienger
@Mansaylon: Did
@mcapra's direction help you? Please update the thread with the requested information if you still need assistance.
Re: how without /nagios
Posted: Tue Feb 19, 2019 12:36 pm
by Mansaylon
Oops ... well my mistake. I actually have NagiosCore. Could that put a moderator in the right area?
Code: Select all
<VirtualHost *:80>
DocumentRoot "/usr/local/nagios/share"
ServerName nag.domain.com
Redirect / https://nag.domain.com
</VirtualHost>
Re: how without /nagios
Posted: Tue Feb 19, 2019 5:54 pm
by npolovenko
@Mansaylon, Did you specify the updated path to the CGI-bin library?
Re: how without /nagios
Posted: Tue Feb 19, 2019 11:17 pm
by Mansaylon
oh ... this has an effect. If I use it manually / nagios in between, I get the trends.
Where can I register this permanently? This is probably the solution for the map as well.
Re: how without /nagios
Posted: Wed Feb 20, 2019 3:18 pm
by npolovenko
@Mansaylon, It doesn't save when you hit Apply? Your default JSON URL doesn't have /nagios/ before cgi-bin?
Try changing the CGI path in this file:
/usr/local/nagios/share/config.inc.php
$cfg['cgi_base_url']='/nagios/cgi-bin';
Re: how without /nagios
Posted: Thu Feb 21, 2019 8:09 am
by Mansaylon
Unfortunately not.
Without /nagios I also get no data when I select 'HOSTS'.
When I move the mouse over the menu items, I see in the status bar the respective call.
Show all
https://nag.domain.com/nagios/cgi-bin ..... only with Map and Trends is only
https://nag.domain.com/cgi-bin ....
Re: how without /nagios
Posted: Fri Feb 22, 2019 3:55 pm
by ssax
Please run this command and PM one of us the resulting
/tmp/HTTPDFILES.zip file:
Code: Select all
zip -r /tmp/HTTPDFILES.zip /etc/httpd/conf/httpd.conf /etc/httpd/conf.d
Thank you
Re: how without /nagios
Posted: Mon Feb 25, 2019 11:38 am
by ssax
See the PM I sent you, please replace the files with the ones I've attached then restart Apache: