nagios web start error

DutchDaemon said:
Still the symlink error in the error log?

I see this
Code:
 29 17:35:04 2010] [error] [client 192.168.0.90] 
Symbolic link not allowed or link target not accessible: /usr/local/www/apache22/data/test
 
Well, I don't think there are any more options to allow symlinks (that I know of right now), so you can try taking this approach from the other side:

Code:
cd /usr/local/www/apache22/data/
rm nagios
mv /usr/local/www/nagios . ( <--- yes, that's a dot)
ln -s /usr/local/www/apache22/data/nagios /usr/local/www/

And try http://192.168.0.xx/nagios/ again. Make sure to use that new nagios.conf you made.
 
DutchDaemon said:
Well, I don't think there are any more options to allow symlinks (that I know of right now), so you can try taking this approach from the other side:

Code:
cd /usr/local/www/apache22/data/
rm nagios
mv /usr/local/www/nagios . ( <--- yes, that's a dot)
ln -s /usr/local/www/apache22/data/nagios /usr/local/www/

And try http://192.168.0.xx/nagios/ again. Make sure to use that new nagios.conf you made.

Thanks
I do that and right now I can see nagios pages with apache
but I do not understand this
Code:
Make sure to use that new nagios.conf you made
and another problem is this when I go to nagios page and for example services I see message like this
new page is open and I see this
Code:
You have chosen to  open status.cgi  which is binary File from http://192.168.0.85 Would you like to save this file
 
I mean the nagios.conf from post #15, which contains the correct pathnames (<Directory /usr/local/www/apache22/data/nagios>).

Do you have the cgi modules loaded?

[cmd=]httpd -M | grep -i cgi[/cmd]
Code:
 cgi_module (shared)
 scgi_module (shared)

They should be in httpd.conf as:

Code:
LoadModule cgi_module libexec/apache22/mod_cgi.so
LoadModule scgi_module          libexec/apache22/mod_scgi.so

This only works if you compiled Apache with:

Code:
[X] CGI                   Enable mod_cgi
 
DutchDaemon said:
I mean the nagios.conf from post #15, which contains the correct pathnames (<Directory /usr/local/www/apache22/data/nagios>).

Do you have the cgi modules loaded?

[cmd=]httpd -M | grep -i cgi[/cmd]
Code:
 cgi_module (shared)
 scgi_module (shared)

They should be in httpd.conf as:

Code:
LoadModule cgi_module libexec/apache22/mod_cgi.so
LoadModule scgi_module          libexec/apache22/mod_scgi.so

This only works if you compiled Apache with:

Code:
[X] CGI                   Enable mod_cgi

I have this
Code:
LoadModule cgi_module libexec/apache22/mod_cgi.so
and when I run this command
Code:
[cmd=]httpd -M | grep -i cgi[/cmd]
I see this
Code:
Syntax OK
 cgi_module (shared)
I use your nagios.conf from post number 15
 
Ok, a few things to check:

1. Do you have this line in httpd.conf?

Code:
Include etc/apache22/Includes/*.conf

2. Is your nagios.conf in /usr/local/etc/apache22/Includes/nagios.conf ?

3. Do all real pathnames (to directories and files) in your nagios.conf exist? Just run 'ls -l' to each pathname to see if they actually exist (not /nagios/ and /nagios/cgi-bin/, because those are aliased).
 
Yes I have this
Code:
Include etc/apache22/Includes/*.conf
Yes my nagios.conf is in this path
Code:
/usr/local/etc/apache22/Includes/nagios.conf
 
I run this command
Code:
cd /usr/local/www/nagios/cgi-bin/
and I see this
Code:
usr/local/www/nagios/cgi-bin # ls
avail.cgi		extinfo.cgi		notifications.cgi	status.cgi		summary.cgi
cmd.cgi			histogram.cgi		outages.cgi		statusmap.cgi		tac.cgi
config.cgi		history.cgi		showlog.cgi		statuswml.cgi		trends.cgi
 
Ah, I see the error in that nagios.conf:

Code:
ScriptAlias /nagios/cgi-bin/ /usr/local/www/apache22/data/www/nagios/cgi-bin/

must be

Code:
ScriptAlias /nagios/cgi-bin/ /usr/local/www/apache22/data/nagios/cgi-bin/

Without a correct and valid ScriptAlias Apache will not run cgi scripts.
 
DutchDaemon said:
Ah, I see the error in that nagios.conf:

Code:
ScriptAlias /nagios/cgi-bin/ /usr/local/www/apache22/data/www/nagios/cgi-bin/

must be

Code:
ScriptAlias /nagios/cgi-bin/ /usr/local/www/apache22/data/nagios/cgi-bin/

Without a correct and valid ScriptAlias Apache will not run cgi scripts.

I check that and put new path for cgi in nagios.conf

but I see that error again and Firefox and opera want download cgi file
I think I have big error in http.conf
 
I make big mistake , my httpd.conf has many error , so I delete it and after delete I copy original one ih apache directory and modify it for use php and php5 and do not touch nothing , after that I restart it and I do not see error , so I type this http://192.168.0.xx/nagios/ and I see error about 403 forbidden and I can not access to nagios web page , so I do this
Code:
cd /usr/local/www/apache22/data/
rm nagios
mv /usr/local/www/nagios . ( <--- yes, that's a dot)
ln -s /usr/local/www/apache22/data/nagios /usr/local/www/
but after restart apache , I see again error about forbidden to nagios
but other thing like
http://192.168.0.xx/joomla
http://192.168.0.xx/gallery2
http://192.168.0.xx/squirrelmail
http://192.168.0.xx/roundcube

works good
after I make new http.conf
I do not see error in
http-error.log
about permission
and I see not this error
Code:
Symbolic link not allowed or link target not accessible: /usr/local/www/apache22/data/nagios
 
After long time search and deinstall nagios I see this end of installation
Code:
nable Nagios in /etc/rc.conf with the following line:

   nagios_enable="YES"

 Configuration templates are available in /usr/local/etc/nagios as
 *.cfg-sample files.  Copy them to *.cfg files where required and
 edit to suit your needs.  Documentation is available in HTML form
 in /usr/local/www/nagios/docs.

 If you don't already have a web server running, you will need to
 install and configure one to finish off your Nagios installation.
 When used with Apache, the following should be sufficient to publish
 the web component of Nagios (modify the allow list to suit):

   <Directory /usr/local/www/nagios>
     Order deny,allow
     Deny from all
     Allow from 127.0.0.1
     php_flag engine on
     php_admin_value open_basedir /usr/local/www/nagios/:/var/spool/nagios/
   </Directory>

   <Directory /usr/local/www/nagios/cgi-bin>
     Options ExecCGI
   </Directory>

   ScriptAlias /nagios/cgi-bin/ /usr/local/www/nagios/cgi-bin/
   Alias /nagios/ /usr/local/www/nagios/
I put this in nagios.conf in
Code:
/usr/local/etc/apache22/Includes
I see error about 403 forbidden and I see I do not have permission
so I delete nagios.conf from
Code:
/usr/local/etc/apache22/Includes
and put this file
Code:
/usr/local/etc/apache22/httpd.conf
and restart apache and every thing work good and I can use nagios
but I like put it
Code:
/usr/local/etc/apache22/Includes
I do not know why when I put in this directory
Code:
/usr/local/etc/apache22/Includes
it dose not work and I see error about permission
 
I have been having this issue too. I was able to fix the permission problem by adding the line.

Code:
DirectoryIndex index.php

but now I am running into an issue with PHP. When I open, http://server/nagios/ in firefox. It just shows the index.php files as text and it is not actually running the php code.

I added the lines:
Code:
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

but it has still not helped.
 
joehillen said:
I have been having this issue too. I was able to fix the permission problem by adding the line.

Code:
DirectoryIndex index.php

but now I am running into an issue with PHP. When I open, http://server/nagios/ in firefox. It just shows the index.php files as text and it is not actually running the php code.

I added the lines:
Code:
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

but it has still not helped.

I have all of them in my http.conf
I think problem is another thing
 
Did you try adding it inside <Directory /usr/local/www/nagios/>?

Here is what mine looks like:
Code:
<Directory /usr/local/www/nagios/>
        DirectoryIndex index.php
        Order deny,allow
        Allow from all
        php_flag engine on
        php_admin_value open_basedir /usr/local/www/nagios/:/var/spool/nagios/
</Directory>

Also, I figured out the php not running issue. I have to go to http://server/nagios/index.php or fix the Alias:
Code:
Alias /nagios "/usr/local/www/nagios/"
ScriptAlias /nagios/cgi-bin /usr/local/www/nagios/cgi-bin/
Notice the "/" at the end the the path in the Directory tag above.
 
after update all ports and reinstall apache22 , php5 , php5-extension and reinstall all service run by apache like nagios , phpbb , and ,,,
everything are ok right now ,
I do not understand what was problem
 
Back
Top