mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-03-20 03:57:02 +08:00
[mailman3] Add our own urls file
The current deployment doesn't look to work correctly for redirects, this should fix it. Signed-off-by: Michal Konecny <mkonecny@redhat.com>
This commit is contained in:
16
roles/mailman3/files/urls.py
Normal file
16
roles/mailman3/files/urls.py
Normal file
@@ -0,0 +1,16 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from django.contrib import admin
|
||||
from django.urls import include, re_path, reverse_lazy
|
||||
from django.views.generic import RedirectView
|
||||
|
||||
urlpatterns = [
|
||||
re_path(r'^$', RedirectView.as_view(
|
||||
url=reverse_lazy('list_index'),
|
||||
permanent=True)),
|
||||
re_path(r'^admin/', include('postorius.urls')),
|
||||
re_path(r'^archives/', include('hyperkitty.urls')),
|
||||
re_path(r'', include('django_mailman3.urls')),
|
||||
re_path(r'^accounts/', include('allauth.urls')),
|
||||
re_path(r'^django-admin/', include(admin.site.urls)),
|
||||
]
|
||||
@@ -127,7 +127,17 @@
|
||||
- config
|
||||
- mailman
|
||||
notify:
|
||||
- reload apache
|
||||
- restart mailmanweb
|
||||
|
||||
- name: Install the hyperkitty/postorius urls file
|
||||
ansible.builtin.file:
|
||||
src: urls.py
|
||||
dest: "{{ mailman_webui_confdir }}/urls.py"
|
||||
tags:
|
||||
- config
|
||||
- mailman
|
||||
notify:
|
||||
- restart mailmanweb
|
||||
|
||||
- name: Create the fulltext index dir
|
||||
ansible.builtin.file:
|
||||
|
||||
@@ -43,7 +43,7 @@ MAILMAN_REST_API_PASS = '{{ mailman_rest_api_pass }}'
|
||||
MAILMAN_ARCHIVER_KEY = '{{ mailman_hyperkitty_archiver_key }}'
|
||||
MAILMAN_ARCHIVER_FROM = ('127.0.0.1', '::1')
|
||||
|
||||
ROOT_URLCONF = 'mailman_web.urls'
|
||||
ROOT_URLCONF = 'urls'
|
||||
|
||||
# Application definition
|
||||
|
||||
@@ -120,8 +120,6 @@ TEMPLATES = [
|
||||
},
|
||||
]
|
||||
|
||||
WSGI_APPLICATION = 'wsgi.application'
|
||||
|
||||
|
||||
# Database
|
||||
# https://docs.djangoproject.com/en/1.8/ref/settings/#databases
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
# Redirecting to hyperkitty if nothing is specified
|
||||
RewriteEngine on
|
||||
RewriteRule ^/$ /hyperkitty [R,L]
|
||||
RewriteRule ^/$ /archives [R,L]
|
||||
|
||||
ProxyPreserveHost On
|
||||
ProxyRequests off
|
||||
|
||||
Reference in New Issue
Block a user