diff --git a/modules/mailman/manifests/init.pp b/modules/mailman/manifests/init.pp index b7db1b1089..70a452259f 100644 --- a/modules/mailman/manifests/init.pp +++ b/modules/mailman/manifests/init.pp @@ -8,6 +8,12 @@ class mailman($mailman_host='') { ensure => installed, } + file { '/etc/apache2/mods-enabled/rewrite.load': + target => '/etc/apache2/mods-available/rewrite.load', + ensure => link, + require => Package['apache2'], + } + file { "/var/www/index.html": source => 'puppet:///modules/mailman/index.html', owner => 'root', @@ -43,6 +49,7 @@ class mailman($mailman_host='') { target => '/etc/apache2/sites-available/mailman', require => [ File['/etc/apache2/sites-available/mailman'], + File['/etc/apache2/mods-enabled/rewrite.load'], ], } diff --git a/modules/mailman/templates/mailman.vhost.erb b/modules/mailman/templates/mailman.vhost.erb index 5d06ae376d..16f613abb6 100644 --- a/modules/mailman/templates/mailman.vhost.erb +++ b/modules/mailman/templates/mailman.vhost.erb @@ -11,6 +11,9 @@ DocumentRoot /var/www +RewriteEngine on +RewriteRule ^/$ /cgi-bin/mailman/listinfo [R] + # We can find mailman here: ScriptAlias /cgi-bin/mailman/ /usr/lib/cgi-bin/mailman/ # And the public archives: