Howto setup mailman + nginx + thttpd cgi server + ubuntu 10.10 (debian)

Mark Alan varia at e-healthexpert.org
Mon Nov 15 21:50:22 MSK 2010


On Thu, 11 Nov 2010 21:22:08 +0300, Igor Sysoev <igor at sysoev.ru> wrote:
> Please look this:
> http://nginx.org/pipermail/nginx/2010-October/023255.html

Problem solved. Thanks Igor.
As usually, your hint just pointed me in the right
direction.

I leave here the setup procedure: 
"Howto setup mailman 2.1.13, using nginx 0.8.53, thttpd 2.25b-11, over
Ubuntu 10.10/debian"

# install & configure the thttpd cgi server
sudo apt-get install thttpd
# change /etc/default/thttpd to have ENABLED=yes
# change /etc/thttpd/thttpd.conf to have:
	port=8000
	dir=/usr/lib/cgi-bin
	nochroot
	user=www-data
	cgipat=/**
	throttles=/etc/thttpd/throttle.conf
	host=127.0.1.1
	logfile=/var/log/thttpd.log
sudo /etc/init.d/thttpd restart # restart using new settings

# install & configure mailman
sudo apt-get install mailman
sudo touch /usr/lib/cgi-bin/mailman/favicon.ico # fake a favicon
# create the mailman admin mailing list
sudo  newlist -l en -q mailman postmaster at example.com SOMEPWD
# must choose an MTA, even if it is MTA=None
sudo sed -i 's/.*\(MTA=None.*\)/\1/' /etc/mailman/mm_cfg.py
#set mailman permissions
sudo chown www-data /var/lib/mailman/archives/private
sudo chmod o-x /var/lib/mailman/archives/private
sudo /usr/sbin/check_perms -f
# start mailman
sudo /etc/init.d/mailman start

# create a nginx cfg file
# create a file /etc/nginx/sites-available/mailman
#
# use location /cgi-bin/mailman/ instead of /cgi-bin/ , otherwise
"(any list...) Administrator Authentication" will not work.
#
server {
	listen 80;
	server_name mail.example.com;
	access_log /var/log/nginx/mailman.access.log;
	error_log /var/log/nginx/mailman.error.log;
	root /usr/lib/cgi-bin/mailman;
	location = /mailman/ {
		proxy_pass http://127.0.1.1:8000/mailman/listinfo;
		proxy_set_header Host $host;
	}
	location /mailman/ {
		proxy_pass http://127.0.1.1:8000/mailman/;
		proxy_set_header Host $host;
	}
	location = /cgi-bin/mailman/ {
		proxy_pass http://127.0.1.1:8000/mailman/listinfo;
		proxy_set_header Host $host;
	}
	location /cgi-bin/mailman/ {
		proxy_pass http://127.0.1.1:8000/mailman/;
		proxy_set_header Host $host;
	}
	location /images/mailman {
		alias /var/lib/mailman/icons;
	}
	location /pipermail {
		alias /var/lib/mailman/archives/public;
		autoindex on;
	}
}

sudo ln \
-svf /etc/nginx/sites-available/mailman /etc/nginx/sites-enabled/
sudo /usr/sbin/nginx -s reload

Run mailman from: http://mail.example.com/mailman

M.



More information about the nginx mailing list