how without /nagios
how without /nagios
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
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
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.
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.
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
Re: how without /nagios
@Mansaylon: Did @mcapra's direction help you? Please update the thread with the requested information if you still need assistance.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: how without /nagios
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>
-
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: how without /nagios
@Mansaylon, Did you specify the updated path to the CGI-bin library?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: how without /nagios
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.
Where can I register this permanently? This is probably the solution for the map as well.
-
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: how without /nagios
@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:
Try changing the CGI path in this file:
/usr/local/nagios/share/config.inc.php
$cfg['cgi_base_url']='/nagios/cgi-bin';
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: how without /nagios
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 ....
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
Please run this command and PM one of us the resulting /tmp/HTTPDFILES.zip file:
Thank you
Code: Select all
zip -r /tmp/HTTPDFILES.zip /etc/httpd/conf/httpd.conf /etc/httpd/conf.d
Re: how without /nagios
See the PM I sent you, please replace the files with the ones I've attached then restart Apache:
Code: Select all
service httpd restart