Page 1 of 3

[Solved] Can't connect to the web page

Posted: Mon May 05, 2014 6:13 pm
by jbruyet
Hey all, I just built a new Nagios server on CentOS 6.5 and I can't connect to it with my browser. The web page should be available:

Code: Select all

[root@FreeNag jobee]# netstat -nap | grep 80
tcp        0      0 :::80                       :::*                        LISTEN      1813/httpd
and I believe this means that Apache is running:

Code: Select all

[root@FreeNag jobee]# ps aux | grep httpd
root      1813  0.0  0.1 233204  8188 ?        Ss   15:51   0:00 /usr/sbin/httpd
apache    1855  0.0  0.0 233204  4816 ?        S    15:51   0:00 /usr/sbin/httpd
apache    1856  0.0  0.0 233204  5524 ?        S    15:51   0:00 /usr/sbin/httpd
apache    1857  0.0  0.0 233204  4816 ?        S    15:51   0:00 /usr/sbin/httpd
apache    1858  0.0  0.0 233204  5524 ?        S    15:51   0:00 /usr/sbin/httpd
apache    1859  0.0  0.0 233204  4816 ?        S    15:51   0:00 /usr/sbin/httpd
apache    1860  0.0  0.0 233204  5524 ?        S    15:51   0:00 /usr/sbin/httpd
apache    1861  0.0  0.0 233204  4816 ?        S    15:51   0:00 /usr/sbin/httpd
apache    1862  0.0  0.0 233204  4816 ?        S    15:51   0:00 /usr/sbin/httpd
root      2083  0.0  0.0 103252   820 pts/0    S+   16:03   0:00 grep httpd
[root@FreeNag jobee]#
When I try to connect to 10.0.3.27/nagios I get a yellow screen with an outline of a box across the top of the page. If I try to connect to 10.0.3.27 I get a "The connection has timed out" error. Any ideas?

Thanks,

Joe B

Re: Can't connect to the web page

Posted: Tue May 06, 2014 9:05 am
by tmcdonald
Please post the following command output:

Code: Select all

tail -20 /var/log/httpd/error_log
Also, does the yellow page have anything related to XML across the top? I've seen that before and I believe it is a browser issue.

Re: Can't connect to the web page

Posted: Tue May 06, 2014 1:26 pm
by jbruyet
Hi tmcdonald, there is nothing in or around the box or anywhere else on the page. The interior of the box is the same yellow as the rest of the page. The bottom and right-side lines of the box are red and the top and left-side lines are... maybe a burgundy color. The error_log is getting this error every five minutes:

Code: Select all

[Tue May 06 10:57:57 2014] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/
[Tue May 06 11:02:57 2014] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/
[Tue May 06 11:07:57 2014] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/
[Tue May 06 11:12:57 2014] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/
[Tue May 06 11:17:57 2014] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/
Permissions on the html folder:

Code: Select all

drwxr-xr-x 2 root root 4096 Apr  3 16:57 html

Thanks,

Joe B

Re: Can't connect to the web page

Posted: Tue May 06, 2014 1:28 pm
by jbruyet
Oops, I forgot to mention that the html folder is empty.

Thanks,

Joe B

Re: Can't connect to the web page

Posted: Tue May 06, 2014 3:46 pm
by tmcdonald
How did you install nagios? From source or through yum?

Re: Can't connect to the web page

Posted: Tue May 06, 2014 6:28 pm
by jbruyet
I chose to do a source install; I thought it would be easier to keep up with any updates.

Thanks,

Joe B

Re: Can't connect to the web page

Posted: Wed May 07, 2014 9:02 am
by slansing
Do you have a list of all of the commands you ran? You may have skipped a step, I'd recommend going back through this document, step by step, if you still have the source it should be really quick:

http://assets.nagios.com/downloads/nagi ... Source.pdf

Re: Can't connect to the web page

Posted: Wed May 07, 2014 12:03 pm
by jbruyet
Hi slansing, I just checked and saw that the list of steps that I used for my install were for Nagios 3.1.1. Should I do some type of uninstall or just install over the top of what is already there?

Thanks,

Joe B

Re: Can't connect to the web page

Posted: Wed May 07, 2014 1:07 pm
by lmiltchev
You can just remove the nagios folder

Code: Select all

cd /usr/local
rm -rf nagios
and then follow the document.

Re: Can't connect to the web page

Posted: Thu May 08, 2014 10:38 am
by jbruyet
Great! I like simple AND easy.

Thanks,

Joe B