mm3 installation question
Hello, everyone.
I just completed the initial installation by following the instructions: https://docs.list.org/en/latest/install/virtualenv.html#virtualenv-install
I went with the apache/uswgi configuration. The site is up and running, but if I click Postorius, it gets redirected to https://mysite.com/postorius/lists and I get not found error message.
The same goes for Lists and Archives.
What did I do wrong? I've found some discussions online, but they seem to be related to a different installation, thus my confusion.
Thank you!
On 3/5/24 1:52 PM, advorkin@cs.princeton.edu wrote:
I went with the apache/uswgi configuration. The site is up and running, but if I click Postorius, it gets redirected to https://mysite.com/postorius/lists and I get not found error message.
The same goes for Lists and Archives.
Compare your urls.py to
<https://gitlab.com/mailman/mailman-web/-/blob/master/mailman_web/urls.py?ref...>.
Some of the path
settings are probably not in the same order as in
that file. The
path('mailman3/', include('postorius.urls')),
path('archives/', include('hyperkitty.urls')),
settings should come after the
path('postorius/', include('postorius.urls')),
path('hyperkitty/', include('hyperkitty.urls')),
settings (unfortunately, mailman-web 0.0.8 has these in the wrong order). Or you can just delete the 'postorius/' and 'hyperkitty/' ones or you can add
ProxyPass "/postorius" "http://127.0.0.1:8000/postorius"
ProxyPass "/hyperkitty" "http://127.0.0.1:8000/hyperkitty"
to your Apache config.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On Wed, Mar 6, 2024 at 3:13 AM Mark Sapiro <mark@msapiro.net> wrote:
On 3/5/24 1:52 PM, advorkin@cs.princeton.edu wrote:
I went with the apache/uswgi configuration. The site is up and running,
but if I click Postorius, it gets redirected to https://mysite.com/postorius/lists and I get not found error message.
The same goes for Lists and Archives.
Compare your urls.py to < https://gitlab.com/mailman/mailman-web/-/blob/master/mailman_web/urls.py?ref...>.
Some of the
path
settings are probably not in the same order as in that file. Thepath('mailman3/', include('postorius.urls')), path('archives/', include('hyperkitty.urls')),
settings should come after the
path('postorius/', include('postorius.urls')), path('hyperkitty/', include('hyperkitty.urls')),
settings (unfortunately, mailman-web 0.0.8 has these in the wrong order). Or you can just delete the 'postorius/' and 'hyperkitty/' ones or you can add
ProxyPass "/postorius" "http://127.0.0.1:8000/postorius" ProxyPass "/hyperkitty" "http://127.0.0.1:8000/hyperkitty"
to your Apache config.
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.
-- 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]
Odhiambo Washington writes:
Mark Sapiro writes:
Some of the
path
settings are probably not in the same order as in that file. Thepath('mailman3/', include('postorius.urls')), path('archives/', include('hyperkitty.urls')),
settings should come after the
path('postorius/', include('postorius.urls')), path('hyperkitty/', include('hyperkitty.urls')),
settings (unfortunately, mailman-web 0.0.8 has these in the wrong order). Or you can just delete the 'postorius/' and 'hyperkitty/' ones or you can add
ProxyPass "/postorius" "http://127.0.0.1:8000/postorius" ProxyPass "/hyperkitty" "http://127.0.0.1:8000/hyperkitty"
to your Apache config.
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.
I believe this is the Apache configuration the OP is using:
<IfModule mod_proxy.c>
ProxyPreserveHost On
ProxyPass "/mailman3" "http://127.0.0.1:8000/mailman3"
ProxyPass "/archives" "http://127.0.0.1:8000/archives"
ProxyPass "/accounts" "http://127.0.0.1:8000/accounts"
ProxyPass "/admin" "http://127.0.0.1:8000/admin"
ProxyPass "/user-profile" "http://127.0.0.1:8000/user-profile"
</IfModule>
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')),
I think Mark must have a configuration with
ProxyPass "/" "http://127.0.0.1:8000/"
in the Apache configuration in mind? Or an alias or rewrite rule. Otherwise I don't see how "/postorius" and "/hyperkitty" paths ever get transmitted to the WSGI server.
Steve
On Wed, Mar 6, 2024 at 12:13 PM Stephen J. Turnbull < turnbull.stephen.fw@u.tsukuba.ac.jp> wrote:
Odhiambo Washington writes:
Mark Sapiro writes:
Some of the
path
settings are probably not in the same order as in that file. Thepath('mailman3/', include('postorius.urls')), path('archives/', include('hyperkitty.urls')),
settings should come after the
path('postorius/', include('postorius.urls')), path('hyperkitty/', include('hyperkitty.urls')),
settings (unfortunately, mailman-web 0.0.8 has these in the wrong order). Or you can just delete the 'postorius/' and 'hyperkitty/' ones or you can add
ProxyPass "/postorius" "http://127.0.0.1:8000/postorius" ProxyPass "/hyperkitty" "http://127.0.0.1:8000/hyperkitty"
to your Apache config.
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.
I believe this is the Apache configuration the OP is using:
<IfModule mod_proxy.c> ProxyPreserveHost On ProxyPass "/mailman3" "http://127.0.0.1:8000/mailman3" ProxyPass "/archives" "http://127.0.0.1:8000/archives" ProxyPass "/accounts" "http://127.0.0.1:8000/accounts" ProxyPass "/admin" "http://127.0.0.1:8000/admin" ProxyPass "/user-profile" "http://127.0.0.1:8000/user-profile" </IfModule>
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')),
I think Mark must have a configuration with
ProxyPass "/" "http://127.0.0.1:8000/"
in the Apache configuration in mind? Or an alias or rewrite rule. Otherwise I don't see how "/postorius" and "/hyperkitty" paths ever get transmitted to the WSGI server.
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, or a urls.py be provided for inclusion in /etc/mailman3/ and which sysadmins can edit to their liking. For example, I'd prefer to have /mm3 instead of /mailman3 to save on transmitted bytes and not clog the Internet pipes :-)
-- 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]
Thank you all for responding so quickly.
Changing the Apache configuration fixed the problem. Here is the final result:
<IfModule mod_proxy.c>
ProxyPreserveHost On
ProxyPass "/mailman3" "http://127.0.0.1:8000/mailman3"
ProxyPass "/archives" "http://127.0.0.1:8000/archives"
ProxyPass "/accounts" "http://127.0.0.1:8000/accounts"
ProxyPass "/admin" "http://127.0.0.1:8000/admin"
ProxyPass "/user-profile" "http://127.0.0.1:8000/user-profile"
ProxyPass "/postorius" "http://127.0.0.1:8000/postorius"
ProxyPass "/hyperkitty" "http://127.0.0.1:8000/hyperkitty"
</IfModule>
Thank you again!
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.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
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]
On 3/6/24 12:56 PM, Odhiambo Washington wrote:
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/"
That only works if Apache serves only Django and no other URLs.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mark Sapiro writes:
On 3/6/24 12:56 PM, Odhiambo Washington wrote:
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/"
That only works if Apache serves only Django and no other URLs.
It's reasonable for a few other paths under root, as well. For example, if you have Shibboleth provide SSO capability, it needs access to some path like /Shibboleth/shibboleth_is_here. Then you can place something like
ProxyPass "/Shibboleth" "!" # check Apache dox
before the ProxyPass "!", which disables the ProxyPass for paths starting with "/Shibboleth".
Not scalable or dynamic, obviously.
Odhiambo Washington writes:
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, or a urls.py be provided for inclusion in /etc/mailman3/ and which sysadmins can edit to their liking.
Patches welcome! :-) I think your second idea is better (explicit is better than implicit), but I believe it's more complicated than dropping an urls.py in /etc/mailman3. My suggestions for anyone who might want to work on it are here:
https://gitlab.com/mailman/mailman-web/-/issues/33
> For example, I'd prefer to have /mm3 instead of /mailman3 to save
on transmitted bytes and not clog the Internet pipes :-)
If not clogging pipes is the goal, qmail and ezmlm are right over there! ;-)
Steve
participants (4)
-
advorkin@cs.princeton.edu
-
Mark Sapiro
-
Odhiambo Washington
-
Stephen J. Turnbull