[Solved] Can't connect to the web page

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.
jbruyet
Posts: 235
Joined: Wed Dec 28, 2011 12:14 pm

[Solved] Can't connect to the web page

Post 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
Last edited by jbruyet on Wed May 14, 2014 3:33 pm, edited 1 time in total.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Can't connect to the web page

Post 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.
Former Nagios employee
jbruyet
Posts: 235
Joined: Wed Dec 28, 2011 12:14 pm

Re: Can't connect to the web page

Post 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
jbruyet
Posts: 235
Joined: Wed Dec 28, 2011 12:14 pm

Re: Can't connect to the web page

Post by jbruyet »

Oops, I forgot to mention that the html folder is empty.

Thanks,

Joe B
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Can't connect to the web page

Post by tmcdonald »

How did you install nagios? From source or through yum?
Former Nagios employee
jbruyet
Posts: 235
Joined: Wed Dec 28, 2011 12:14 pm

Re: Can't connect to the web page

Post by jbruyet »

I chose to do a source install; I thought it would be easier to keep up with any updates.

Thanks,

Joe B
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Can't connect to the web page

Post 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
jbruyet
Posts: 235
Joined: Wed Dec 28, 2011 12:14 pm

Re: Can't connect to the web page

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

Re: Can't connect to the web page

Post by lmiltchev »

You can just remove the nagios folder

Code: Select all

cd /usr/local
rm -rf nagios
and then follow the document.
Be sure to check out our Knowledgebase for helpful articles and solutions!
jbruyet
Posts: 235
Joined: Wed Dec 28, 2011 12:14 pm

Re: Can't connect to the web page

Post by jbruyet »

Great! I like simple AND easy.

Thanks,

Joe B
Locked