Skip to content
Snippets Groups Projects
Verified Commit e834cf41 authored by Kristian Klausen's avatar Kristian Klausen :tada: Committed by Jelle van der Waa
Browse files

mailman -> mailman3 nginx + urls.py

mailman: add static

Don't hardcode lists domain
parent b276aa85
No related branches found
No related tags found
No related merge requests found
This commit is part of merge request !437. Comments created here will be created in the context of that merge request.
......@@ -51,4 +51,10 @@ server {
uwsgi_pass unix:/run/uwsgi/mailman.sock;
}
location ~ ^/(static|mailman3|archives|accounts|admin3)($|/) {
proxy_pass http://{{ hostvars['mailman3.archlinux.org']['wireguard_address'] }};
proxy_set_header Host {{ lists_domain }};
proxy_set_header X-Forwarded-For $remote_addr;
}
}
......@@ -7,6 +7,7 @@
loop:
- {src: mailman.cfg.j2, dest: /etc/mailman.cfg, group: mailman}
- {src: settings.py.j2, dest: /etc/mailman3/settings.py, group: mailman-web}
- {src: urls.py.j2, dest: /etc/mailman3/urls.py, group: mailman-web}
notify:
- reload mailman
- restart mailman-web
......
# -*- coding: utf-8 -*-
# Copyright (C) 1998-2016 by the Free Software Foundation, Inc.
#
# This file is part of Postorius.
#
# Postorius is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your option)
# any later version.
#
# Postorius is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
#
# You should have received a copy of the GNU General Public License along with
# Postorius. If not, see <http://www.gnu.org/licenses/>.
from django.conf.urls import include, url
from django.contrib import admin
from django.urls import reverse_lazy
from django.views.generic import RedirectView
urlpatterns = [
url(r'^$', RedirectView.as_view(
url=reverse_lazy('list_index'),
permanent=True)),
url(r'^mailman3/', include('postorius.urls')),
url(r'^archives/', include('hyperkitty.urls')),
url(r'', include('django_mailman3.urls')),
url(r'^accounts/', include('allauth.urls')),
# Django admin
url(r'^admin3/', admin.site.urls),
]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment