On 4/6/23 20:07, chad.hays86@gmail.com wrote:
Hi, I recently completed the a Mailman3 install using these[1] instructions. I'm able to access the web interface, the Django admin app, etc off the root domain URL. For example: https://mydomain.org/mailman3, https://mydomain.org/admin, https://mydomain.org/archives
What's the most straightforward way to put all of these URL paths behind a different context? For example: https://mydomain.org/lists/mailman3, https://mydomain.org/lists/admin, https://mydomain.org/lists/archives
I'm running Apache2 as my web server and am using mod_proxy to proxy requests to uwsgi.
There are two pieces to this:
For the Django side, copy /opt/mailman/venv/lib/python3.x/site-packages/mailman_web/urls.py to /etc/mailman3/urls.py where python3.x is the python version in your venv and edit that file as in
30,34c30,34
< path('mailman3/', include('postorius.urls')),
< path('archives/', include('hyperkitty.urls')),
< path('', include('django_mailman3.urls')),
< path('accounts/', include('allauth.urls')),
< path('admin/', admin.site.urls),
---
> path('lists/mailman3/', include('postorius.urls')),
> path('lists/archives/', include('hyperkitty.urls')),
> path('lists/', include('django_mailman3.urls')),
> path('lists/accounts/', include('allauth.urls')),
> path('lists/admin/', admin.site.urls),
and add the following to /etc/mailman3/settings.py
ROOT_URLCONF = 'urls'
Then for the apache side, it depends what you have for your ProxyPass directives are. If you have several like
ProxyPass "/mailman3" "http://127.0.0.1:8000/mailman3"
ProxyPass "/archives" "http://127.0.0.1:8000/archives"
...
change those to
ProxyPass "/lists/mailman3" "http://127.0.0.1:8000/lists/mailman3"
ProxyPass "/lists/archives" "http://127.0.0.1:8000/lists/archives"
If you have just one like
ProxyPass "/" "http://127.0.0.1:8000/"
change it to
ProxyPass "/lists" "http://127.0.0.1:8000/lists"
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan