9
0
Fork 1

Bugfixes for apache.

This commit is contained in:
Johan Björklund 2024-11-19 13:27:16 +01:00
parent 9ba0c2d382
commit 2cfcaa00a9
Signed by: bjorklund
GPG key ID: 5E8401339C7F5037

View file

@ -189,11 +189,20 @@ class soc::intelmq(
require => Package['apache2'],
}
exec { 'Enable Apache2 modules':
command => 'a2enmod ssl wsgi proxy proxy_http headers rewrite',
$apache_modules = ['ssl', 'proxy', 'proxy_http', 'headers', 'rewrite',]
$apache_modules.each |String $module| {
exec { 'Enable Apache2 modules':
command => "a2enmod ${module}",
notify => Service['apache2'],
unless => "test -f /etc/apache2/mods-enabled/${module}.load",
}
}
exec { 'Enable mod_wsgi':
command => 'a2enmod wsgi',
require => Package['libapache2-mod-wsgi-py3'],
notify => Service['apache2'],
unless => ['test -f /etc/apache2/mods-enabled/headers.load', 'test -f /etc/apache2/mods-enabled/proxy.load', 'test -f /etc/apache2/mods-enabled/proxy_http.load', 'test -f /etc/apache2/mods-enabled/rewrite.load', 'test -f /etc/apache2/mods-enabled/ssl.load', 'test -f /etc/apache2/mods-enabled/wsgi.load', ],
¦ unless => "test -f /etc/apache2/mods-enabled/${module}.load",
}
file { '/etc/apache2/conf-available/wsgi-venv.conf':