Welcome! Log In Create A New Profile

Advanced

Re: Mailman with nginx and thttpd

October 26, 2010 12:50AM
On Mon, Oct 25, 2010 at 05:02:53PM -0700, David Newman wrote:

> Greetings. I'm getting 404 errors after installing the Mailman mailing
> list manager on a server running nginx and thttpd, and could use some
> help in understanding why.
>
> This is on "Mailserver", an excellent OpenBSD-based mail appliance from
> Allard Consulting that uses nginx. I've pasted the current nginx and
> thttpd configs below; the configs are based on Manlio Perillo's howto here:
>
> http://wiki.list.org/display/DOC/Mailman+and+nginx
>
> In my setup, the hostname is mail.suctest.com. I've created a separate
> virtual host in nginx called 'lists.suctest.com' for the Mailman stuff.
>
> The logs say requests to Mailman URLs such as this one:
>
> http://lists.suctest.com/mailman/listinfo
>
> produce 404 errors in both nginx and thttpd, although it's the latter
> server that returns the error page. The Mailman stuff is in
> /usr/local/mailman and is group readable by mailman.
>
> Thanks in advance for clues on answering these two questions:
>
> 1. How to point nginx and thttp at the correct locations so that I'm not
> getting 404s?
>
> 2. If possible, how to run Mailman under the canonical hostname of
> 'mail.suctest.com' instead of the separate name of 'lists.suctest.com'?

nginx.org runs Mailman's CGI using mini_httpd. This is a simple server by
the same author as thttpd. I have also patched mini_httpd to support
X-Real-IP header. Here is a configuration part related to Mailman:

location = /mailman/ {
proxy_pass http://127.0.0.1/cgi-bin/listinfo;
proxy_set_header Host nginx.org;
proxy_set_header X-Real-IP $remote_addr;
}

location /mailman/ {
proxy_pass http://127.0.0.1/cgi-bin/;
proxy_set_header Host nginx.org;
proxy_set_header X-Real-IP $remote_addr;
}

location = /cgi-bin/ {
proxy_pass http://127.0.0.1/cgi-bin/listinfo;
proxy_set_header Host nginx.org;
proxy_set_header X-Real-IP $remote_addr;
}

location /cgi-bin/ {
proxy_pass http://127.0.0.1/cgi-bin/;
proxy_set_header Host nginx.org;
proxy_set_header X-Real-IP $remote_addr;
}

location /pipermail/ {
alias /usr/local/mailman/archives/public/;
}

Mailman URL is "http://nginx.org/mailman/" due to
proxy_set_header Host nginx.org;

mini_httpd configuraiton is:

user=www
host=127.0.0.1
port=80
dir=/usr/local/mailman
cgipat=cgi-bin/*
pidfile=/var/run/mini_httpd.pid
xrealip=127.0.0.1


--
Igor Sysoev
http://sysoev.ru/en/

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

Mailman with nginx and thttpd

David Newman October 25, 2010 08:10PM

Re: Mailman with nginx and thttpd

Francis Daly October 25, 2010 09:20PM

Re: Mailman with nginx and thttpd

Igor Sysoev October 26, 2010 12:50AM

Re: Mailman with nginx and thttpd

David Newman October 26, 2010 01:36PM

Re: Mailman with nginx and thttpd

Igor Sysoev October 26, 2010 01:42PM

Re: Mailman with nginx and thttpd

David Newman October 26, 2010 02:06PM

Re: Mailman with nginx and thttpd

Igor Sysoev October 26, 2010 02:10PM

Re: Mailman with nginx and thttpd

David Newman October 26, 2010 04:20PM

Re: Mailman with nginx and thttpd

David Newman December 19, 2010 05:58PM

Re: Mailman with nginx and thttpd

Igor Sysoev December 20, 2010 11:20AM

Re: Mailman with nginx and thttpd

David Newman December 20, 2010 12:14PM

Re: Mailman with nginx and thttpd

Igor Sysoev December 20, 2010 12:34PM

Re: Mailman with nginx and thttpd

David Newman December 20, 2010 01:16PM

Re: Mailman with nginx and thttpd

Igor Sysoev December 20, 2010 01:24PM

Re: Mailman with nginx and thttpd

David Newman December 20, 2010 04:02PM

Re: Mailman with nginx and thttpd

Igor Sysoev December 20, 2010 04:30PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 106
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready