From 5aab4d2d7ea7e52cfd0778c2b8ddcc6b649a6bbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Bompard?= Date: Wed, 18 May 2016 10:13:58 +0000 Subject: [PATCH] Mailman: make the old archives available --- roles/mailman/tasks/main.yml | 6 ++++++ roles/mailman/templates/apache.conf.j2 | 13 +++++++++++++ 2 files changed, 19 insertions(+) diff --git a/roles/mailman/tasks/main.yml b/roles/mailman/tasks/main.yml index 56947bc4ef..5ca20f357f 100644 --- a/roles/mailman/tasks/main.yml +++ b/roles/mailman/tasks/main.yml @@ -48,6 +48,12 @@ - mailman - selinux +- name: set the SELinux policy for the old static archives + command: semanage fcontext -a -t httpd_sys_content_t "{{ mailman_webui_basedir }}/old-archives/pipermail(/.*)?" + tags: + - mailman + - selinux + - name: allow Apache to remotely connect to PostgreSQL seboolean: name=httpd_can_network_connect_db state=yes persistent=yes tags: diff --git a/roles/mailman/templates/apache.conf.j2 b/roles/mailman/templates/apache.conf.j2 index ceb3864f48..0ae6c2b4d7 100644 --- a/roles/mailman/templates/apache.conf.j2 +++ b/roles/mailman/templates/apache.conf.j2 @@ -25,3 +25,16 @@ WSGIPythonOptimize 1 Allow from all Require all granted + + +# Old static archives + +Alias /pipermail/ {{ mailman_webui_basedir }}/old-archives/pipermail/ + + Options MultiViews FollowSymLinks + AllowOverride None + Require all granted + AddDefaultCharset Off + + +RedirectMatch ^/pipermail[/]*$ /