Last active
December 18, 2015 21:29
-
-
Save kcoyner/5847384 to your computer and use it in GitHub Desktop.
Mailman, nginx, uwsgi and postfix working together on a Debian server. Make sure you install the Debian package uwsgi-plugin-cgi, which is a separate package from uwsgi.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/uwsgi/apps-available/lists.rustybear.com.ini | |
[uwsgi] | |
plugins = cgi | |
vhost = true | |
master = true | |
touch-reload = %p | |
pidfile = /run/uwsgi/app/lists.rustybear.com/pid | |
log-maxsize = 20971520 | |
socket = 127.0.0.1:14014 | |
chdir = / | |
gid = list | |
uid = www-data | |
threads = 5 | |
# use two mountpoints for cgi | |
cgi = /cgi-bin/mailman=/usr/lib/cgi-bin/mailman | |
cgi = /mailman=/usr/lib/cgi-bin/mailman | |
cgi-index = listinfo | |
vacuum = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name lists.rustybear.com; | |
access_log /var/log/nginx/lists.rustybear.com_access.log; | |
error_log /var/log/nginx/lists.rustybear.com_error.log; | |
# direct access to images | |
location /images/mailman/ { | |
alias /usr/share/images/mailman/; | |
} | |
# direct access to the public archives | |
location /pipermail { | |
alias /var/lib/mailman/archives/public/; | |
index index.html; | |
} | |
# redirect old urls | |
location ^~ /mailman { | |
include uwsgi_params; | |
uwsgi_modifier1 9; | |
uwsgi_pass 127.0.0.1:14010; | |
} | |
location ^~ /cgi-bin/mailman { | |
include uwsgi_params; | |
uwsgi_modifier1 9; | |
uwsgi_pass 127.0.0.1:14014; | |
} | |
error_page 500 502 503 504 /50x.html; | |
location = /50x.html { | |
root /var/www/50x.html; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment