- Thread Starter
- #26
DutchDaemon said:You'll have to try http://192.168.0.xx/test again, because "test" point to /tmp.
I see error about 403 forbidden
Code:
You don't have permission to access /test on this server.
DutchDaemon said:You'll have to try http://192.168.0.xx/test again, because "test" point to /tmp.
You don't have permission to access /test on this server.
DutchDaemon said:Still the symlink error in the error log?
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
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/
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.
Make sure to use that new nagios.conf you made
You have chosen to open status.cgi which is binary File from http://192.168.0.85 Would you like to save this file
cgi_module (shared)
scgi_module (shared)
LoadModule cgi_module libexec/apache22/mod_cgi.so
LoadModule scgi_module libexec/apache22/mod_scgi.so
[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
LoadModule cgi_module libexec/apache22/mod_cgi.so
[cmd=]httpd -M | grep -i cgi[/cmd]
Syntax OK
cgi_module (shared)
Include etc/apache22/Includes/*.conf
cd /usr/local/www/nagios/cgi-bin/
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
ScriptAlias /nagios/cgi-bin/ /usr/local/www/apache22/data/www/nagios/cgi-bin/
ScriptAlias /nagios/cgi-bin/ /usr/local/www/apache22/data/nagios/cgi-bin/
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.
DutchDaemon said:Restarted Apache, I hope?
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/
Symbolic link not allowed or link target not accessible: /usr/local/www/apache22/data/nagios
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/
/usr/local/etc/apache22/Includes
/usr/local/etc/apache22/Includes
/usr/local/etc/apache22/httpd.conf
/usr/local/etc/apache22/Includes
/usr/local/etc/apache22/Includes
DirectoryIndex index.php
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
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.
<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>
Alias /nagios "/usr/local/www/nagios/"
ScriptAlias /nagios/cgi-bin /usr/local/www/nagios/cgi-bin/