Skip to content

Instantly share code, notes, and snippets.

@drucko
Last active August 29, 2015 13:56
Show Gist options
  • Save drucko/9294429 to your computer and use it in GitHub Desktop.
Save drucko/9294429 to your computer and use it in GitHub Desktop.
# /opt/nginx/sbin/uwsgi --ini /etc/uwsgi/mailman.ini
[uwsgi]
master = True
touch-reload = %p
daemonize = /var/log/uwsgi-mailman.log
pidfile = /var/run/uwsgi-mailman.pid
log-maxsize = 20971520
socket = 127.0.0.1:4010
chdir = /
uid = nobody
gid = list
plugins = cgi
threads = 20
# Debian's standard location
cgi = /mailman/=/usr/lib/cgi-bin/mailman
cgi-index = listinfo
server {
# ... listen, server_name, ssl, etc..
# 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 {
rewrite ^/mailman(.*) /$1 permanent;
}
# evertyhing else pass to uwsgi-cgi
location / {
include uwsgi_params;
uwsgi_modifier1 9;
uwsgi_pass 127.0.0.1:4010;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment