nagios webinterace - site not found

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.
chr1s
Posts: 9
Joined: Fri Aug 12, 2016 2:35 am

nagios webinterace - site not found

Post 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
bwallace
Posts: 1145
Joined: Tue Nov 17, 2015 1:57 pm

Re: nagios webinterace - site not found

Post 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 -
Be sure to check out the Knowledgebase for helpful articles and solutions!
chr1s
Posts: 9
Joined: Fri Aug 12, 2016 2:35 am

Re: nagios webinterace - site not found

Post 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
Attachments
apache2 log file
apache2 log file
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: nagios webinterace - site not found

Post 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.
Former Nagios Employee
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: nagios webinterace - site not found

Post 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'
Be sure to check out our Knowledgebase for helpful articles and solutions!
chr1s
Posts: 9
Joined: Fri Aug 12, 2016 2:35 am

Re: nagios webinterace - site not found

Post 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]…
Attachments
1.JPG
nagios_log.JPG
websitenotfoundHTTP404.JPG
chr1s
Posts: 9
Joined: Fri Aug 12, 2016 2:35 am

Re: nagios webinterace - site not found

Post by chr1s »

attached the "cat nagios" output
Attachments
catnagios.txt
(9.59 KiB) Downloaded 102 times
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: nagios webinterace - site not found

Post 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.
Former Nagios Employee
chr1s
Posts: 9
Joined: Fri Aug 12, 2016 2:35 am

Re: nagios webinterace - site not found

Post 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
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: nagios webinterace - site not found

Post by rkennedy »

Can you post your cgi.cfg file? Also, are you using the user 'nagiosadmin', or have you added a custom one?
Former Nagios Employee
Locked