On 12/22/22 22:26, Odhiambo Washington wrote:
On Fri, Dec 23, 2022 at 9:21 AM Odhiambo Washington <odhiambo@gmail.com> wrote:
And now I am having a problem with mod_wsgi. First, the URL displayed when I load the page looks bogus to me. While I expect the URL to be https://mm3-lists.kictanet.or.ke/mailman3/domains/, mod_wsgi give me https://mm3-lists.kictanet.or.ke/mailman3/mailman3/domains/ - there is an extra /mailman3!
See below:
So I have;
- https://mm3-lists.kictanet.or.ke/mailman3/mailman3/lists/ - working, or appears to.
- https://mm3-lists.kictanet.or.ke/mailman3/mailman3/domains/ - working, or appears to.
- https://mm3-lists.kictanet.or.ke/mailman3/mailman3/bans/ - working, or appears to
- https://mm3-lists.kictanet.or.ke/mailman3/mailman3/users - working, or appears to
- https://mm3-lists.kictanet.or.ke/mailman3/mailman3/lists/kictanet.lists.kict...
- This throws an exception error when I click "Manage Subscription".
messages like these
[Fri Dec 23 09:10:55.393386 2022] [wsgi:error] [pid 74857] [remote 197.232.81.246:14181] File "/opt/mailman/mm/venv/lib/python3.9/site-packages/mailmanclient/restbase/connection.py", line 160, in call [Fri Dec 23 09:10:55.393390 2022] [wsgi:error] [pid 74857] [remote 197.232.81.246:14181] raise HTTPError(params.get('url'), response.status_code, [Fri Dec 23 09:10:55.393394 2022] [wsgi:error] [pid 74857] [remote 197.232.81.246:14181] urllib.error.HTTPError: HTTP Error 500: {"title": "500 Internal Server Error"}
Indicate an uncaught exception in Mailman core. What's in mailman.log?
And while I do not quite understand the error itself, there is also one particular line that I also saw that has left me baffled: [Fri Dec 23 08:53:18.290411 2022] [core:info] [pid 91236] [client 197.232.81.246:13865] AH00128: File does not exist: /usr/local/www/apache24/data/archives/list/ kictanet@lists.kictanet.or.ke/thread/VIHCC6MSXZSNHY7YPEJ3D2US4N7MHJEC/, referer: https://mm3-lists.kictanet.or.ke/archives/list/kictanet@lists.kictanet.or.ke
This is because something is doing an HTTP GET for
/archives/list/kictanet@lists.kictanet.or.ke/thread/VIHCC6MSXZSNHY7YPEJ3D2US4N7MHJEC/
and the URL is not recognized as one handled by mod_wsgi so apache tries
to get it from its DocumentRoot.
mod_wsgi has to serve a number of URLs. Look in /opt/mailman/mm/urls.py for urlpatterns. You will probably see things like
url(r'^accounts/', include('allauth.urls')),
# Django admin
url(r'^admin/', admin.site.urls),
url(r'^mailman3/', include('postorius.urls')),
url(r'^archives/', include('hyperkitty.urls')),
Those are all things that need to be handled by mod_wsgi
In your apache config, you only have a WSGIScriptAlias for /mailman3. Thus paths need to be prefixed with /mailman3 in order to be handled by mod_wsgi. I'm not sure what is doing this prefixing, but without it paths that don't begin with /mailman3 don't work unless you also have things like
WSGIScriptAlias /accounts /opt/mailman/mm/wsgi.py WSGIScriptAlias /admin /opt/mailman/mm/wsgi.py WSGIScriptAlias /archives /opt/mailman/mm/wsgi.py
in your apache config.
I also need to add the fact that at the point where I am clicking "Manage Subscription", the URL has changed to https://mm3-lists.kictanet.or.ke/mailman3/archives/list/kictanet@lists.kicta... (just a single /mailman3).
Something is adding mailman3/ to URLs. In the above the URL should be https://mm3-lists.kictanet.or.ke/archives/list/kictanet@lists.kictanet.or.ke..., but an extra /mailman3 is added. The others are like https://mm3-lists.kictanet.or.ke/mailman3/lists/ and an extra /mailman3 is added.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan