Page 1 of 1

Missing /usr/local/nagios/share/nagios directory

Posted: Tue Feb 26, 2019 11:54 am
by smallchild1
Hi!

I am trying install nagios-core and nagios-plugins following the tutorial here:
https://support.nagios.com/kb/article/n ... tml#Ubuntu

I am, however using nginx instead of apache2.

I have set everything up to the point where I can successfully visit my nagios homepage. When following the steps to install the plugins, I try to visit /nagios my server is returning a 404 response. Looking at the error logs I am getting the error:
"/usr/local/nagios/share/nagios" failed (2: No such file or directory)

I tried looking in the Makefile of the nagioscore-nagios-4.4.3 and nagios-plugins-release-2.2.1 but I am having trouble finding anything that creates the share/nagios directory.

Is there a specific make command i can use to properly to set up this directory? What step sets this directory up?

Thank you!

Re: Missing /usr/local/nagios/share/nagios directory

Posted: Tue Feb 26, 2019 3:14 pm
by scottwilkerson
the directory should be /usr/local/nagios/share

I think you have mis-configured nginx

Re: Missing /usr/local/nagios/share/nagios directory

Posted: Wed Feb 27, 2019 10:29 am
by smallchild1
Thank you very much for the reply,

I have root /usr/local/nagios/share in my config, I assumed that the url /nagios corresponded to a subdirectory with its own index.php

Looking in the nagioscore-nagios-4.4.3/sample-config/httpd.conf, I see that the /nagios url is an alias to the root directory. I appreciate your help!

Once I get things working I will share my nginx configuration so hopefully others dont make the same mistake

Re: Missing /usr/local/nagios/share/nagios directory

Posted: Wed Feb 27, 2019 10:43 am
by scottwilkerson
Here is an example of someome usign nginx to serve nagios

https://atlgeek.wordpress.com/2014/05/1 ... 14-04-lts/