dataset/seed/mailman/templates/config-nginx.conf
2022-08-19 20:30:13 +02:00

31 lines
1.4 KiB
Text

charset utf-8;
client_max_body_size 75M;
location /mailman/postorius_static {
alias /usr/lib/python3.10/site-packages/postorius/static;
}
#FIXME user-profile seems to be in hyperkitty redirect in existing page
location /mailman/user-profile {
proxy_pass http://127.0.0.1:8002/postorius/users;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
%for %%location in ['accounts', 'admin', 'postorius']
location /mailman/%%location {
proxy_pass http://127.0.0.1:8002/%%location;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
%end for
location /mailman {
rewrite ^(/mailman/.*)$ /mailman/postorius/ permanent;
}