diff --git a/nagios4/Vagrantfile b/nagios4/Vagrantfile index c24f90e..0e0716b 100644 --- a/nagios4/Vagrantfile +++ b/nagios4/Vagrantfile @@ -12,7 +12,9 @@ Vagrant.configure("2") do |config| # Every Vagrant development environment requires a box. You can search for # boxes at https://vagrantcloud.com/search. - config.vm.box = "debian/bullseye64" + config.vm.box = "debian/bookworm64" + config.vm.hostname = "nagios4" + # Disable automatic box update checking. If you disable this, then # boxes will only be checked for updates when the user runs @@ -65,12 +67,15 @@ Vagrant.configure("2") do |config| # documentation for more information about their specific syntax and use. config.vm.provision "shell", inline: <<-SHELL apt-get update - apt-get install -y curl wget - apt-get install -y nagios4 + apt-get install -y vim curl wget apache2 php nagios4 nagios-plugins-contrib cp /etc/nagios4/apache2.conf /etc/apache2/sites-available/nagios4.conf a2ensite nagios4.conf a2enmod rewrite cgi + sed -i 's/Require all/#Require all/' /etc/apache2/conf-enabled/nagios4-cgi.conf + sed -i 's/#Require\tvalid-user/Require\tvalid-user/' /etc/apache2/conf-enabled/nagios4-cgi.conf systemctl reload apache2 + htdigest -b -c /etc/nagios4/htdigest.users "Nagios4" nagiosadmin admin SHELL end +