Fixes with apache config.

This commit is contained in:
Johan Björklund 2024-11-14 12:47:14 +01:00
parent 42328a9fa5
commit 6eae0c9b00
Signed by untrusted user: bjorklund
GPG key ID: 5E8401339C7F5037
2 changed files with 18 additions and 1 deletions

View file

@ -0,0 +1,3 @@
<IfModule mod_wsgi.c>
WSGIPythonHome /opt/intelmq/venv
</IfModule>

View file

@ -72,7 +72,21 @@ class soc::intelmq(
}
exec { 'Enable Apache2 modules':
command => 'a2enmod ssl wsgi proxy proxy_http header rewrite',
command => 'a2enmod ssl wsgi proxy proxy_http headers rewrite',
require => Package['libapache2-mod-wsgi-py3'],
notify => Service['apache2'],
}
file { '/etc/apache2/conf-available/wsgi-venv.conf':
ensure => file,
content => file('soc/intelmq/apache/wsgi-venv.conf'),
}
exec { 'Enable wsgi-venv conf':
command => 'a2enconf wsgi-venv'
creates => '/etc/apache2/conf-enabled/wsgi-venv.conf'
require => File('/etc/apache2/conf-available/wsgi-venv.conf'),
notify => Service['apache2'],
}
}