Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Arch Linux
infrastructure
Commits
5d0c9d3b
Verified
Commit
5d0c9d3b
authored
Apr 30, 2022
by
Kristian Klausen
🎉
Browse files
mailman: Add map for redirecting migrated lists to the ml3 interface
parent
9d475948
Changes
3
Hide whitespace changes
Inline
Side-by-side
roles/mailman/files/migrated-lists.map
0 → 100644
View file @
5d0c9d3b
roles/mailman/tasks/main.yml
View file @
5d0c9d3b
...
...
@@ -49,6 +49,10 @@
-
name
:
make nginx log dir
file
:
path=/var/log/nginx/{{ lists_domain }} state=directory owner=root group=root mode=0755
-
name
:
install nginx mailman2->mailman3 redirect map
copy
:
src=migrated-lists.map dest=/etc/nginx/maps/ owner=root group=root mode=0644
notify
:
reload nginx
-
name
:
set up nginx
template
:
src=nginx.d.conf.j2 dest="/etc/nginx/nginx.d/mailman.conf" owner=root group=root mode=644
notify
:
reload nginx
...
...
roles/mailman/templates/nginx.d.conf.j2
View file @
5d0c9d3b
...
...
@@ -15,6 +15,10 @@ server {
}
}
map $uri $migrated_uri {
include maps/migrated-lists.map;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
...
...
@@ -28,6 +32,10 @@ server {
ssl_certificate_key /etc/letsencrypt/live/{{ lists_domain }}/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/{{ lists_domain }}/chain.pem;
if ($migrated_uri) {
return 302 $migrated_uri;
}
# redirect old urls
location /mailman/ {
rewrite ^/mailman/(.*) /$1 permanent;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment