first access to Nagios

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
Locked
nagios-nube
Posts: 8
Joined: Wed Mar 04, 2015 12:22 pm

first access to Nagios

Post 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.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: first access to Nagios

Post 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
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
nagios-nube
Posts: 8
Joined: Wed Mar 04, 2015 12:22 pm

Re: first access to Nagios

Post 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?
nagios-nube
Posts: 8
Joined: Wed Mar 04, 2015 12:22 pm

Re: first access to Nagios

Post 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>
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: first access to Nagios

Post 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.
nagios-nube
Posts: 8
Joined: Wed Mar 04, 2015 12:22 pm

Re: first access to Nagios

Post 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.
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: first access to Nagios

Post 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.
nagios-nube
Posts: 8
Joined: Wed Mar 04, 2015 12:22 pm

Re: first access to Nagios

Post 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.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: first access to Nagios

Post 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.
Former Nagios employee
Locked