On 11/21/23 04:32, Odhiambo Washington wrote:
I tested the above out of curiosity. It failed. There are 9 lists in the setup, but I am only interested in 1.
(venv) mailman@debian12:~$ mailman-web shell Python 3.11.2 (main, Mar 13 2023, 12:18:29) [GCC 12.2.0] Type 'copyright', 'credits' or 'license' for more information IPython 8.17.2 -- An enhanced Interactive Python. Type '?' for help. In [1]: from hyperkitty.lib.compat import get_list_by_name In [2]: mlist = get_list_by_name('list_name_only', 'list_domain')
You can't use literally ('list_name_only', 'list_domain'). If the list of interest is for example alist@example.com, the above should be
mlist = get_list_by_name('alist', 'example.com')
...
Was I supposed to substitute something for the real listname of the list I wanted?
Yes.
Another thing - totally unrelated - that surprised me: While using the commented-out block below, I could not click and get anything beyond http://http://list.name/mailman3 as anything to do with /postorius/xxxxx gave "Page not found" error. However, with the second config block that uses the UNIX socket, I am able to access everything
#<IfModule mod_proxy.c> # ProxyPreserveHost On # ProxyPass "/mailman3" "http://127.0.0.1:8010/mailman3" # ProxyPass "/archives" "http://127.0.0.1:8010/archives" # ProxyPass "/accounts" "http://127.0.0.1:8010/accounts" # ProxyPass "/admin" "http://127.0.0.1:8010/admin" # ProxyPass "/user-profile" "http://127.0.0.1:8010/user-profile" # </IfModule> ProxyPassMatch ^/static/ ! ProxyPassMatch ^/favicon.ico ! ProxyPass / unix:/opt/mailman/mm/var/uwsgi.sock|uwsgi://localhost/ ProxyPassReverse / unix:/opt/mailman/mm/var/uwsgi.sock|uwsgi://localhost/
Why is it that the UNIX socket option worked flawlessly while the other option failed???
The first option does not have ProxyPass for urls matching /postorius or /hyperkitty so such urls don't work. The second option passes everything (ProxyPass / ) to uwsgi via the socket so all urls that uwsgi can handle will work.
You could do something similar with the first option with simply
ProxyPass "/" "http://127.0.0.1:8010/"
assuming uwsgi is listening on port 8010.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan