Page 1 of 1

Nagios webUI issue

Posted: Wed Jun 05, 2013 3:34 am
by antonyw
Hi Guys,

I've been running Nagios 3.0.3 for years on a FreeBSD 6.2 machine without any issues.
Yesterday I (had to) upgrade the BSD box to 9.1 and also apache to 2.2 (coming from 2.0).

I got everything to work again but Nagios webUI is being difficult as in the layout is really messed up.
See attachment.

Anyone who can help me fix this?

Much appreciated!

Antony

Re: Nagios webUI issue

Posted: Wed Jun 05, 2013 12:02 pm
by abrist
Lets check the error_log for apache. Run the running tail of the log. While it is running, try to browse the nagios web interface. Click a few links to different pages. Then crtl-C the tail and post the output here in code wraps:

Code: Select all

tail -f /var/log/httpd-error.log

Re: Nagios webUI issue

Posted: Wed Jun 05, 2013 2:17 pm
by antonyw
Hello,

I upgraded Nagios to the latest versions in ports (3.5.0), hoping this would fix the lay out issue; but no luck.
Here`s the output of the apache error log:

Code: Select all

[Wed Jun 05 21:14:13 2013] [error] [client xxx.xxx.xxx.xxx] File does not exist: /usr/local/www/nagios/nagios, referer: http://xxx.xxx.xxx/nagios/cgi-bin/status.cgi?host=all


Re: Nagios webUI issue

Posted: Wed Jun 05, 2013 2:31 pm
by antonyw
Hm, so it seems like its looking for its file in a wrong directory as its looking in /usr/local/www/nagios/nagios (the extra nagios entry shouldnt be there)
I changed the doc root in the apache config from /usr/local/www/nagios to /usr/local/www and now the services/hosts pages work fine!

But the homepage does not work anymore because it wants to read main.php in /usr/local/www

hmm...
here`s my vhost config. Any ideas?

Code: Select all

<VirtualHost *:80>
 
        ServerName xxxxx.xxxx.xxxx
        DocumentRoot /usr/local/www
        DirectoryIndex index.php index.html
        ErrorLog /var/log/xxxx-error.log
        Options Includes FollowSymLinks MultiViews
        ScriptAlias /nagios/cgi-bin "/usr/local/www/nagios/cgi-bin/"

<Directory "/usr/local/www/nagios">
        AllowOverride None
        Order allow,deny
        Allow from all
</Directory>


<Directory /usr/local/www/nagios/cgi-bin>
        Options ExecCGI
        AllowOverride None
        Order allow,deny
        Allow from all
</Directory>

</VirtualHost>



Re: Nagios webUI issue

Posted: Wed Jun 05, 2013 2:37 pm
by abrist
I am a bit unfamiliar with the expected defaults of apache on a bsd system, but you could try either moving main.php into the nagios folder, or including main.php in your directory index directive:

Code: Select all

DirectoryIndex index.php index.html main.php