Current time: 05-30-2025, 05:20 AM Hello There, Guest! (LoginRegister)


Post Reply 
nagios 500 error
Author Message
FeG Offline
Banned

Posts: 222
Joined: Aug 2007
Post: #9
RE: nagios 500 error
Hey guys,

I got nagios set up like this:

I created the directory /var/www/nagios and copied the contents of /usr/lib/cgi-bin/nagios2 and /usr/share/nagios2/htdocs in there, all owned by the www-data - User:
Code:
mkdir /var/www/nagios
mkdir /var/www/nagios/cgi-bin /var/www/nagios/htdocs
cp /usr/lib/cgi-bin/nagios2/* /var/www/nagios/cgi-bin/
cp -R /usr/share/nagios2/htdocs/* /var/www/nagios/htdocs/
chown -R www-data.www-data /var/www/nagios

Then I created the file /etc/apache2/sites-available/nagios2.conf with the following content:
Code:
#
# nagios Virtual Host Webinterface
#

<VirtualHost xxx.xxx.xxx.xxx:80>
        ServerAdmin     admin@mydomain.com
        DocumentRoot    /var/www/nagios/htdocs

        ServerName      nagios.mydomain.com

        ErrorLog        /var/log/apache2/nagios.mydomain.com-error.log
        CustomLog       /var/log/apache2/nagios.mydomain.com-access.log combined

        ScriptAlias /cgi-bin/nagios2 /var/www/nagios/cgi-bin
        ScriptAlias /nagios2/cgi-bin /var/www/nagios/cgi-bin

        <Directory /var/www/nagios>
                Options FollowSymLinks

                DirectoryIndex index.html

                AllowOverride AuthConfig
                Order Allow,Deny
                Allow From All

                AuthName "Nagios Access"
                AuthType Basic
                AuthUserFile /etc/nagios2/htpasswd.users
                require valid-user
        </Directory>
</VirtualHost>

and enabled it via
Code:
a2ensite nagios2.conf
/etc/init.d/apache2 reload

That's all. It's working.
(If I missed some explanation, please tell me)

Is this worth making a Wiki HowTo of it?

Greetings
FeG
09-14-2007 06:49 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread

Forum Jump:


User(s) browsing this thread: 1 Guest(s)