Feature #52
Installing Nagios 3 on Debian/Ubuntu as ISPConfig3 Virtual Host
Description
By default, Ubuntu will not configure Nagios upon installation. This guide will show how to install Nagios on an Ubuntu system running a common LAMP setup with ISPConfig 3
Install Nagios 3, Plugins, MySQL Support¶
sudo apt-get install nagios3 nagios-plugins nagios-nrpe-plugin ndoutils-nagios3-mysql
- Set password for
nagiosadmin
user - Confirm password
- Enter MySQL
root
password - Create Nagios database password
Setup host in ISPConfig¶
- Navigate to the [Site] tab
Create a new site¶
[Domain
]
- Domain: monitor.example.com
- Disable: CGI
- Disable: SuExec
- Enable: SSL
Options
]
- Append to the following to the PHP basedir:
:/usr/lib/cgi-bin/nagios3:/usr/share/nagios3/htdocs:/etc/nagios3/stylesheets
- Add the following Apache directive (Taken from the
/etc/nagios3/apache2.conf
):# apache configuration for nagios 3.x ScriptAlias /cgi-bin/nagios3 /usr/lib/cgi-bin/nagios3 # Where the stylesheets (config files) reside Alias /stylesheets /etc/nagios3/stylesheets # Where the HTML pages live # Changed "Alias" directive to "DocumentRoot" as Nagios 3 is installed via apt and is located outside the default web directory. DocumentRoot /usr/share/nagios3/htdocs <DirectoryMatch (/usr/share/nagios3/htdocs|/usr/lib/cgi-bin/nagios3|/etc/nagios3/stylesheets)> Options FollowSymLinks DirectoryIndex index.php index.html AllowOverride AuthConfig Order Allow,Deny Allow From All AuthName "Nagios Access" AuthType Basic AuthUserFile /etc/nagios3/htpasswd.users require valid-user </DirectoryMatch> <Directory /usr/share/nagios3/htdocs> Options +ExecCGI </Directory>
At this point Nagios should work by going to monitor.example.com/
.