On Mon, Dec 26, 2022 at 5:07 PM Eggert Ehmke <eggert@eehmke.de> wrote:
Ok,
I hope this is readable. I just copíed the content of some files into the pastebin, don't know if it is possible to post tar.gz there. https://pastebin.ubuntu.com/p/mmRJJwKDc3/
Just tell me if this works for you, and when something is missing. Most of the settings are copied from some other sites and just adjusted for my needs. Good luck!
So it seems your WSGIDaemonProcess is defined somewhere outside the VHOST, right? Or it wasn't necessary? And what does your urls.py look like?
My setup is PUBLIC for everyone so I will not hide the domain name :-)
In my setup, MM3 is installed in /opt/mailman/mm/. and mod_wsgi is enabled in Apache. I am running uwsgi on a TCP socket, not unix socket.
The whole of my *VHOST:* <CUT> WSGIDaemonProcess mailman-web display-name=mailman-web maximum-requests=1000 umask=0002 user=mailman group=mailman python-path=/opt/mailman/mm:/opt/mailman/mm/venv/lib/python3.9/site-packages:/opt/mailman/mm/venv/lib/python3.9 python-home=/opt/mailman/mm/venv home=/opt/mailman/mm/var WSGIRestrictSignal Off <VirtualHost *:443> ServerName mm3-lists.kictanet.or.ke
SSLEngine on SSLCertificateFile "/usr/local/etc/letsencrypt/live/ mm3-lists.kictanet.or.ke/cert.pem" SSLCertificateKeyFile "/usr/local/etc/letsencrypt/live/ mm3-lists.kictanet.or.ke/privkey.pem" SSLCertificateChainFile "/usr/local/etc/letsencrypt/live/ mm3-lists.kictanet.or.ke/chain.pem" CustomLog /var/log/mm3-lists-access.log combined ErrorLog /var/log/mm3-lists-error.log LogLevel info Alias /favicon.ico /opt/mailman/mm/static/hyperkitty/img/favicon.ico Alias /static "/opt/mailman/mm/static" <Directory "/opt/mailman/mm/static"> Require all granted </Directory> WSGIScriptAlias / /opt/mailman/mm/wsgi.py <Directory "/opt/mailman/mm/"> <Files wsgi.py> Order deny,allow Allow from all Require all granted </Files> WSGIProcessGroup mailman-web </Directory> </VirtualHost> </CUT>
*2. uwsgi.ini:* <CUT> [uwsgi] http-socket = 127.0.0.1:8000 pidfile = /opt/mailman/mm/var/uwsgi.pid chdir = /opt/mailman/mm/ virtualenv = /opt/mailman/mm/venv/ module=mailman_web.wsgi:application env =PYTHONPATH=/opt/mailman/mm/ env =DJANGO_SETTINGS_MODULE=settings master = true process = 2 threads = 2 attach-daemon = /opt/mailman/mm/venv/bin/mailman-web qcluster req-logger = file:/opt/mailman/mm/var/logs/uwsgi.log logger = qcluster file:/opt/mailman/mm/var/logs/uwsgi-qcluster.log log-route = qcluster uwsgi-daemons logger = cron file://opt/mailman/mm/var/logs/uwsgi-cron.log log-route = cron uwsgi-cron logger = file:/opt/mailman/mm/var/logs/uwsgi-error.log uid = mailman gid = mailman </CUT>
*3. uwsgi - *Running supervised (supervisord): <CUT> [program:uwsgi] directory=/opt/mailman/mm/ environment=PYTHONPATH=/opt/mailman/mm/ command=/usr/bin/su -m mailman -c '/opt/mailman/mm/venv/bin/uwsgi --ini /opt/mailman/mm/uwsgi.ini' 2>&1 | logger -t uwsgi autostart=true autorestart=true user=mailman group=mailman stopasgroup=true killasgroup=true </CUT>
*4. urls.py*: <CUT> from django.conf.urls import include from django.urls import re_path from django.contrib import admin from django.urls import reverse_lazy from django.views.generic import RedirectView from django_mailman3.views.profile import delete_account, user_profile urlpatterns = [ re_path(r'^$', RedirectView.as_view( url=reverse_lazy('list_index'), permanent=True)), re_path(r'^postorius/', include('postorius.urls')), re_path(r'^hyperkitty/', include('hyperkitty.urls')), re_path(r'^user-profile/delete$', delete_account, name='mm_user_account_delete'), re_path(r'^user-profile/$', user_profile, name='mm_user_profile'), re_path(r'^accounts/', include('allauth.urls')), re_path(r'^admin/', admin.site.urls), re_path(r'^mm/', include('postorius.urls')), re_path(r'^archives/', include('hyperkitty.urls')), ] </CUT>
And that's pretty much what I am using on my FreeBSD server.
PS: Possible to bottom-post instead of top-posting? :)
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 "Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-)