Skip to content

Instantly share code, notes, and snippets.

@cite
Created September 20, 2013 10:49
Show Gist options
  • Save cite/6635853 to your computer and use it in GitHub Desktop.
Save cite/6635853 to your computer and use it in GitHub Desktop.
Mailman with nginx and fcgiwrap
# lists.example.net definition
server {
server_name lists.example.net;
listen 80;
listen [::]:80;
root /var/www/lists;
index index.html;
access_log /var/log/nginx/access-lists.example.net.log;
location / {
try_files $uri $uri/ =404;
}
location /mailman/ {
gzip off;
root /usr/lib/cgi-bin;
fastcgi_split_path_info (^/mailman/[^/]+)(/.*)$;
fastcgi_pass unix:/var/run/fcgiwrap.socket;
# I commented out SCRIPT_FILENAME in /etc/nginx/fastcgi_params
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME /usr/lib/cgi-bin$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
location /pipermail/ {
alias /var/lib/mailman/archives/public/;
autoindex on;
}
location /images/mailman/ {
alias /usr/share/images/mailman/;
}
location ~ /\.ht {
deny all;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment