Page 1 of 1

first access to Nagios

Posted: Wed Mar 04, 2015 12:59 pm
by nagios-nube
I just installed Nagios Log Server and its giving me a 403 error. I used both wget and a browser and both get the same results.

Sorry for such a noob question.

Re: first access to Nagios

Posted: Wed Mar 04, 2015 1:06 pm
by abrist
1) How did you install nagios? Source or package?
2) What version of nagios are you running?
3) What OS are you using?
4) Is apache running?

Code: Select all

service httpd status
If so, restart it:

Code: Select all

service httpd restart
5) Did you install the webconf?

Code: Select all

make install-webconf
6) Is the apache vhost file where it is expected:

Code: Select all

ls /etc/httpd/conf.d/
If so, what are its contents?

Code: Select all

cat /etc/httpd/conf.d/nagios.conf

Re: first access to Nagios

Posted: Wed Mar 04, 2015 1:20 pm
by nagios-nube
I installed from source, on CentOS.
I'm running whatever the latest is, looks like 1.3.
OS = CentOS
Apache is running, which is why I get 403 errors.

Like a noob, I hadn't checked the apache error log. It complains that apache doesn't have access to /var/www/html/index.php. Those files are owned/grouped as root:root, and apache can't access them.

What is the best way to resolve? I could chown the /var/www stuff to apache. Any better ideas?

Re: first access to Nagios

Posted: Wed Mar 04, 2015 1:29 pm
by nagios-nube
I am not sure if the full install did webconf or not. The instructions didn't mention it and I didn't know to look for it.

The vhost file is where its supposed to be. Here are the contents:
Alias /nagioslogserver "/var/www/html/nagioslogserver/www/"

<Directory "/var/www/html/nagioslogserver/www/">
# SSLRequireSSL
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>

Re: first access to Nagios

Posted: Wed Mar 04, 2015 1:53 pm
by jdalrymple
Sounds like your install was at least partially complete since your vhost showed up.

Did you for sure restart apache? The 403s on /var/www/html/index.php make it sound like the config didn't get read properly.

Code: Select all

service httpd restart
Besides that I'd look at your install.log (should be in the untarred nagioslogserver folder) and see if you can see anything that failed there.

Re: first access to Nagios

Posted: Wed Mar 04, 2015 2:54 pm
by nagios-nube
I have just re-started httpd but got the same 403 error.

The error log file used to say can't access /var/www/html/index.php and I see that the Unix permissions don't allow that access. However, after these restarts, it is not giving that error any more - just says access denied in error_log and access_log.

Re: first access to Nagios

Posted: Wed Mar 04, 2015 3:01 pm
by jdalrymple
access denied to what now? Still /var/www/html/index.php?

Generally speaking, for NLS to work you could delete /var/www/html/index.php entirely, permissions there don't mean anything to NLS. In addition, root.root is not an uncommon spec for hosted html so long that o permissions are r-x.

Re: first access to Nagios

Posted: Thu Mar 05, 2015 2:36 pm
by nagios-nube
What I found, btw, is that I get a 403 error going to /nagioslogserver.

But, if I go to / it gives me an error in the httpd error_log saying it can't access the directory. So, I changed perms on the directory and now I can get to the initial node configuration screen.

The problem now is that the web server (Kibana) can't get to elastic search.

ES isn't started and starting it gets a memory error in the logs. I fixed that, and now get a null pointer exception error.

This problem is now a new post in the forum.
Thanks.

Re: first access to Nagios

Posted: Thu Mar 05, 2015 3:51 pm
by tmcdonald
nagios-nube wrote:This problem is now a new post in the forum.
Thanks.
If you are going to open a new thread for that, please let us know so we can close this one.