El 26/12/22 a las 16:08, Odhiambo Washington escribiĆ³:
On Mon, Dec 26, 2022 at 5:07 PM Eggert Ehmke<eggert@eehmke.de> wrote:
Odhiambo, I didn't change anything from my config as I wrote down in https://forums.FreeBSD.org/threads/mailman-3.61050/post-488128, save the python version (I upgraded to 3.9 moths ago, as I posted in this list).
My urls.py looks like this:
################### from django.conf import settings ### mod. 30/10/22 ###from django.conf.urls import include, url from django.conf.urls import include from django.urls import re_path as url #####
from django.contrib import admin from django.urls import reverse_lazy from django.views.generic import RedirectView
urlpatterns = [ url(r'^$', RedirectView.as_view( url=reverse_lazy('list_index'), permanent=True)), url(r'^postorius/', include('postorius.urls')), url(r'^hyperkitty/', include('hyperkitty.urls')), url(r'', include('django_mailman3.urls')), 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')), ]
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 = qclusterfile:/opt/mailman/mm/var/logs/uwsgi-qcluster.log log-route = qcluster uwsgi-daemons logger = cronfile://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? :)
--
Mailman's content filtering has removed the following MIME parts from this message.
Content-Type: image/png Name: firma-GHP-emails.png
Replaced multipart/alternative part with first alternative.