On 12/6/21 10:15 PM, David Newman wrote:
After installing MM3 on Debian 10 using the venv docs, no graphics appear in the admin or list pages, just broken links.
The mailmanweb log has lines like this:
ERROR 2021-12-07 06:04:10,002 18262 django.security.DisallowedHost Invalid HTTP_HOST header: '127.0.0.1'. You may need to add '127.0.0.1' to ALLOWED_HOSTS.
which is odd because there is the line for "localhost" in settings.py, and /etc/hosts correctly ties this to 127.0.0.1.
Add '127.0.0.1' to ALLOWED_HOSTS anyway.
There are entries like this in /var/log/nginx/error.log saying the files just aren't there:
2021/12/06 22:00:30 [error] 18123#18123: *65 open() "/opt/mailman/web/static/postorius/img/mailman_logo_small_trans.png" failed (2: No such file or directory), client: x.x.x.x, server: somehost.example.com, request: "GET /static/postorius/img/mailman_logo_small_trans.png HTTP/2.0", host: "somehost.example.com", referrer: "https://somehost.example.com/mailman/lists/"
(I've obfuscated names and addresses here, but "somehost.example.com" refers to a valid FQDN in the log.)
I thought I'd followed all the venv docs, but the /opt/mailman/web/static/postorius directory doesn't exist. Did I miss something?
Assuming you have
STATIC_ROOT = '/opt/mailman/web/static'
in your /etc/mailman3/settings.py file, you may need to create that directory if it doesn't exist. You shouldn't need to manually create the /opt/mailman/web/static/postorius directory if the /opt/mailman/web/static directory exists and is writable/searchable by the Mailman user.
That should enable
(venv)$ mailman-web collectstatic
to populate that directory. Be sure you've run all four commands at https://docs.mailman3.org/en/latest/install/virtualenv.html#run-database-mig... et seq.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan