On Wed, Mar 6, 2024 at 8:53 PM Mark Sapiro <mark@msapiro.net> wrote:
On 3/6/24 1:33 AM, Odhiambo Washington wrote:
On Wed, Mar 6, 2024 at 12:13 PM Stephen J. Turnbull < turnbull.stephen.fw@u.tsukuba.ac.jp> wrote:
Odhiambo Washington writes:
The odd thing is that the HOWTO that he followed never involves the manipulation of any urls.py at all - it's not even mentioned at any point. So obviously the issue is caused by something else and I suspect something within Apache needs to be re-evaluated in the guide.
The HOWTO installs mailman-web which contains a urls.py.
Note that Apache doesn't know about the "/postorius" and "/hyperkitty" URI paths. It is quite unclear to me how this works at all with either the
path('mailman3/', include('postorius.urls')), path('archives/', include('hyperkitty.urls')), path('postorius/', include('postorius.urls')), path('hyperkitty/', include('hyperkitty.urls')),
version of urls.py or the reverse order version
path('postorius/', include('postorius.urls')), path('hyperkitty/', include('hyperkitty.urls')), path('mailman3/', include('postorius.urls')), path('archives/', include('hyperkitty.urls')),
This is an issue with Django. I'm not sure of the exact mechanism, but consider the first of the above two sets. If you go to the mailman3/ URL that gets redirected to the postorius/ URL. I.e. two paths that ultimately reference the same thing wind up considering the second path as the canonical path and redirecting the first path to the second.
I was not initially aware of this when I added the postorius/ and hyperkitty/ paths to mailman_web/urls.py. I did this with the intent of making either set of paths work, and I added those paths after the mailman3/ and archives/ paths, and this version got released as mailman-web 0.0.8. That caused the recommended Apache config to fail because now the mailman3/ and archives/ paths were redirected to the postorius/ and hyperkitty/ URLs which are not in the recommended Apache config.
I have since reordered the paths in mailman_web/urls.py, but that version isn't yet released. Thus the issue. See
https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/... for some background.
My thinking then is that the documentation at
https://docs.list.org/en/latest/install/virtualenv.html#apache-configuration
needs to be fixed by adding the missing bits,
What needs to be done is a mailmab-web 0.0.9 release in PyPI. This will fix the issue.
Hi Mark,
Thank you for making it much clearer. Is it possible that an Apache directive like below will fix everything (albeit discreetly with sysadmins driving blindly)?
ProxyPass "/" "http://127.0.0.1:8000/"
As was suggested by Mr. Turnbull (and previously by you on another thread)? It will be simpler, but leaves almost everyone (except the Devs) blind to the fact there exists a urls.py somewhere that determines the mappings? Maybe a note about it in the documentation will help?
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 In an Internet failure case, the #1 suspect is a constant: DNS. "Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-) [How to ask smart questions: http://www.catb.org/~esr/faqs/smart-questions.html]