summaryrefslogtreecommitdiffstats
path: root/roles/mailman/templates/vhost.conf
diff options
context:
space:
mode:
Diffstat (limited to 'roles/mailman/templates/vhost.conf')
-rw-r--r--roles/mailman/templates/vhost.conf14
1 files changed, 14 insertions, 0 deletions
diff --git a/roles/mailman/templates/vhost.conf b/roles/mailman/templates/vhost.conf
new file mode 100644
index 0000000..bd2f01e
--- /dev/null
+++ b/roles/mailman/templates/vhost.conf
@@ -0,0 +1,14 @@
+{% for i in '80', '443' %}
+<VirtualHost *:{{ i }}>
+
+ <Directory /usr/lib/mailman/cgi-bin/>
+ DirectoryIndex listinfo
+ </Directory>
+
+ RedirectMatch ^/$ /mailman/
+
+ RedirectMatch ^/mailman[/]*$ /mailman/listinfo
+ ServerName {{ website_url | default( ansible_hostname ) }}
+
+</VirtualHost>
+{% endfor %}