After installing NagVis error The requested URL /nagvis/config.php was not found on this server

nagvis

(Dimitri Zantidis) #1

Hi there,

I was wondering if you could help me with the following issue I’m experiencing after installing NagVis.

I installed NagVis (v1.9.10) on a Raspbian GNU/Linux 9 raspberry pi using the install.sh that comes with NagVis. When I launch my browser and enter the URL http://nagios-server/nagvis/config.php or even http://localhost/nagvis/config.php I get an error from Apache “The requested URL /nagvis/config.php was not found on this server”.

My installation was successful, as I didn’t get any errors for any dependencies or anything else. The NagVis home is /usr/local/nagvis. The path to Apache config directory is /etc/apache2/conf-available.

My path definitions in nagvis.ini.php are as follows:
[paths]
; absolute physical NagVis path
base="/usr/local/nagvis/share"
; absolute html NagVis path
htmlbase="/nagvis"
; absolute html NagVis cgi path
htmlcgi="/nagios/cgi-bin"

The first lines of my nagvis.conf file in /etc/apache2 are as follows:
Alias /nagvis “/usr/local/nagvis/share”

<Directory “/usr/local/nagvis/share”>
Options FollowSymLinks
AllowOverride None

# Apache >= 2.4 Require all granted # Apache < 2.4 Order allow,deny Allow from all

I have followed some instructions that I found in another thread in this forum and changed the permissions of the “compile” folder as follows:
chmod -R 777 /usr/local/nagvis/var/tmpl/compile

I have also disabled SELinux.

The error in the Apache access.log file is as follows:
XXX.XXX.XXX.XXX - - [28/Dec/2018:01:56:51 +1100] “GET /nagvis/config.php HTTP/1.1” 404 506 “-” “Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36”

Something tells me that the problem has to do with permissions or something like that, but I’m very new with NagVis and don’t know much about Apache configuration either. I would appreciate if you guys could help me.

Thank you in advance for your time.


#2

Where is config.php located and what are the permissions?


(Dimitri Zantidis) #3

Hi and thank you for your question.

config.php is located in /usr/local/nagvis/share and the permissions are set as 664. I just followed the default location for the installation that was suggested by the install.sh script.


(Dimitri Zantidis) #4

Hi there,

I found a solution to the problem I was experiencing.

In my system, by default, the installation script (install.sh) of NagVis creates the file nagvis.cfg in the folder /etc/apache2/conf-available. By copying the file in /etc/apache2/sites-enabled/nagvis.cfg I managed to resolve the issue and now NagVis is working fine.

As I mentioned in my first post, I run a Raspbian GNU/Linux 9 Operating System and the version of NagVis is v1.9.10.

Do you guys think that this could be a bug, and if it is, do you think that I should report it to the NagVis web site?

Thank you again for your time.


#5

Please read the Apache documention on how to enable the site setting (a2ensite) as copying it is not the right way to do it.

I’d assume that the NagVis developers will point you to the Apache documentation as well.


(Dimitri Zantidis) #6

Thank you for your feedback. I will do as you directed me.