Page 1 of 2
nagios webinterace - site not found
Posted: Fri Aug 12, 2016 2:40 am
by chr1s
Hey,
i installed nagios 4.1.1 on a vmserver ubuntu 16 without without any Errors.
i followed this guide
http://www.ubuntugeek.com/install-nagio ... erver.html and everything was fine.
but when i try to check out the webinterface
http://localhost/nagios i`m able to log on but then i get the site not found error - http 404
i restarted nagios and apache2 Service and both are up and running.
Any Ideas?
thanks,
chris
Re: nagios webinterace - site not found
Posted: Fri Aug 12, 2016 11:00 am
by bwallace
Please run the following from the command line. While it is running reproduce the 404 error and after you see it, copy the output and post it here.
tail -f /var/log/apache2/error.log
Also, referencing the install guide you used, did you "Run the following command instead of make install-webconf" (see the section "Compile and install Nagios Using the following commands")
sudo /usr/bin/install -c -m 644 sample-config/httpd.conf /etc/apache2/sites-enabled/nagios.conf
- thanks -
Re: nagios webinterace - site not found
Posted: Tue Aug 16, 2016 1:26 am
by chr1s
I ran the command and uploaded the error.log.
After i got the error message´:
/usr/bin/install -c -m 644 sample-config/httpd.conf /etc/httpd/conf.d/nagios.conf
/usr/bin/install: cannot create regular file ‘/etc/httpd/conf.d/nagios.conf': No such file or directory
Makefile:296: recipe for target ‘install-webconf' failed
make: *** [install-webconf] Error 1
thats why i used : sudo /usr/bin/install -c -m 644 sample-config/httpd.conf /etc/apache2/sites-enabled/nagios.conf without any error Messages.
thanks
Re: nagios webinterace - site not found
Posted: Tue Aug 16, 2016 1:10 pm
by rkennedy
Can you refresh the page that is erroring out a few times, and then post your entire error_log? It doesn't look like anything in that screenshot is applicable as to what's going on with apache not being able to load the Core file.
Re: nagios webinterace - site not found
Posted: Tue Aug 16, 2016 1:42 pm
by lmiltchev
In addition to this, can you run the following commands and show the output?
Code: Select all
apache2 -v
php -v
mysql -V
systemctl is-enabled nagios
cat /etc/init.d/nagios
ps -ef | grep 'nagios\|apache2'
Re: nagios webinterace - site not found
Posted: Wed Aug 17, 2016 3:02 am
by chr1s
grep nagios Output:
nagios@nagios:~$ ps -ef | grep `nagios/|apache2`
-bash: nagios/: Datei oder Verzeichnis nicht gefunden
[Wed Aug 17 10:01:40.713118 2016] [core:warn] [pid 10031] AH00111: Config variable ${APACHE_LOCK_DIR} is not defined
[Wed Aug 17 10:01:40.713568 2016] [core:warn] [pid 10031] AH00111: Config variable ${APACHE_PID_FILE} is not defined
[Wed Aug 17 10:01:40.713916 2016] [core:warn] [pid 10031] AH00111: Config variable ${APACHE_RUN_USER} is not defined
[Wed Aug 17 10:01:40.714219 2016] [core:warn] [pid 10031] AH00111: Config variable ${APACHE_RUN_GROUP} is not defined
[Wed Aug 17 10:01:40.714547 2016] [core:warn] [pid 10031] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Wed Aug 17 10:01:40.716537 2016] [core:warn] [pid 10031:tid 140211200583552] AH00111: Config variable ${APACHE_RUN_DIR} is not defined
[Wed Aug 17 10:01:40.717470 2016] [core:warn] [pid 10031:tid 140211200583552] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Wed Aug 17 10:01:40.717918 2016] [core:warn] [pid 10031:tid 140211200583552] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Wed Aug 17 10:01:40.718226 2016] [core:warn] [pid 10031:tid 140211200583552] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
AH00526: Syntax error on line 74 of /etc/apache2/apache2.conf:
Invalid Mutex directory in argument file:${APACHE_LOCK_DIR}
Aufruf: grep [OPTION]… MUSTER [DATEI]…
Re: nagios webinterace - site not found
Posted: Wed Aug 17, 2016 3:09 am
by chr1s
attached the "cat nagios" output
Re: nagios webinterace - site not found
Posted: Wed Aug 17, 2016 11:42 am
by rkennedy
Did everything compile properly? Was selinux enabled during the install?
Can you also run the following 4 commands?
Code: Select all
apache2 -v
php -v
mysql -V
systemctl is-enabled nagios
Your installation does not look proper at all. To be honest, it might make more sense to start fresh. @lmiltchev labbed this out and it is working following the exact guide you mentioned.
Re: nagios webinterace - site not found
Posted: Thu Aug 18, 2016 8:26 am
by chr1s
I made the Installation again and now it works so far - but now i have another permission issue
when i try to access the Website and switch to "hosts" or "Services" i receive : You don't have permission to access /nagios/cgi-bin/status.cgi on this server.
permission on /usr/local/nagios/bin -rwxrwxr-x 1 nagios nagcmd
thanks for helping me out
Re: nagios webinterace - site not found
Posted: Thu Aug 18, 2016 10:41 am
by rkennedy
Can you post your cgi.cfg file? Also, are you using the user 'nagiosadmin', or have you added a custom one?