how without /nagios

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Mansaylon
Posts: 6
Joined: Thu Feb 14, 2019 1:14 pm

how without /nagios

Post 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
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: how without /nagios

Post 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.
Former Nagios employee
https://www.mcapra.com/
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: how without /nagios

Post by cdienger »

@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.
Mansaylon
Posts: 6
Joined: Thu Feb 14, 2019 1:14 pm

Re: how without /nagios

Post 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>
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: how without /nagios

Post by npolovenko »

@Mansaylon, Did you specify the updated path to the CGI-bin library?
Untitled.png
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Mansaylon
Posts: 6
Joined: Thu Feb 14, 2019 1:14 pm

Re: how without /nagios

Post 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.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: how without /nagios

Post 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';
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Mansaylon
Posts: 6
Joined: Thu Feb 14, 2019 1:14 pm

Re: how without /nagios

Post 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 ....
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: how without /nagios

Post 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
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: how without /nagios

Post by ssax »

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
Locked