# Running mailman within a domain

**URL:** <https://www.ruby-forum.com/t/running-mailman-within-a-domain/220598>\
**Category:** NGINX\
**Created:** [June 14, 2012, 12:43am UTC](https://www.ruby-forum.com/t/running-mailman-within-a-domain/220598 "2012-06-14T00:43:32Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [June 14, 2012, 12:43am UTC](https://www.ruby-forum.com/t/running-mailman-within-a-domain/220598/1 "2012-06-14T00:43:32Z")

</div>

Greetings,

this is my first take at nginx. I try to add /cgi-bin/mailman/… to an  
existing server instance ([mail.sys4.de](http://mail.sys4.de)). At the moment I can call  
scripts  
directly e.g. [https://mail.sys4.de/cgi-bin/mailman/listinfo](https://mail.sys4.de/cgi-bin/mailman/listinfo) works.

What I fail to accieve is getting access to lists e.g.  
[https://mail.sys4.de/cgi-bin/mailman/listinfo/users](https://mail.sys4.de/cgi-bin/mailman/listinfo/users). The Browser  
receives a  
403 and the fast\_cgi wrapper reports:

Cannot chdir to script directory (/usr/lib/cgi-bin/mailman/listinfo)"  
while  
reading response header from upstream

What is it I am doing wrong?

This is my nginx configuration to include mailman into the website:

```
    location /cgi-bin/mailman {
           root /usr/lib/;
           fastcgi_split_path_info (^/cgi-bin/mailman/[^/]*)(.*)$;
           include /etc/nginx/fastcgi_params;
           fastcgi_param SCRIPT_FILENAME 

```

$document\_root$fastcgi\_script\_name;  
fastcgi\_param PATH\_INFO $fastcgi\_path\_info;  
fastcgi\_param PATH\_TRANSLATED  
$document\_root$fastcgi\_path\_info;  
fastcgi\_intercept\_errors off;  
fastcgi\_pass unix:/var/run/fcgiwrap.socket;  
}  
location /images/mailman {  
alias /usr/share/images/mailman;  
}  
location /pipermail {  
alias /var/lib/mailman/archives/public;  
autoindex on;  
}

/etc/nginx/fastcgi\_params contains these settings:

fastcgi\_param QUERY\_STRING $query\_string;  
fastcgi\_param REQUEST\_METHOD $request\_method;  
fastcgi\_param CONTENT\_TYPE $content\_type;  
fastcgi\_param CONTENT\_LENGTH $content\_length;

fastcgi\_param SCRIPT\_FILENAME $request\_filename;  
fastcgi\_param SCRIPT\_NAME $fastcgi\_script\_name;  
fastcgi\_param REQUEST\_URI $request\_uri;  
fastcgi\_param DOCUMENT\_URI $document\_uri;  
fastcgi\_param DOCUMENT\_ROOT $document\_root;  
fastcgi\_param SERVER\_PROTOCOL $server\_protocol;

fastcgi\_param GATEWAY\_INTERFACE CGI/1.1;  
fastcgi\_param SERVER\_SOFTWARE nginx/$nginx\_version;

fastcgi\_param REMOTE\_ADDR $remote\_addr;  
fastcgi\_param REMOTE\_PORT $remote\_port;  
fastcgi\_param SERVER\_ADDR $server\_addr;  
fastcgi\_param SERVER\_PORT $server\_port;  
fastcgi\_param SERVER\_NAME $server\_name;

fastcgi\_param HTTPS $https;

# PHP only, required if PHP was built with --enable-force-cgi-redirect

fastcgi\_param REDIRECT\_STATUS 200;

My error log gives this output:

2012/06/14 00:39:48 [debug] 27873#0: \*13 post event 0000000002292AB0  
2012/06/14 00:39:48 [debug] 27873#0: \*13 post event 00000000022A62C0  
2012/06/14 00:39:48 [debug] 27873#0: \*13 delete posted event  
00000000022A62C0  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http empty handler  
2012/06/14 00:39:48 [debug] 27873#0: \*13 delete posted event  
0000000002292AB0  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http keepalive handler  
2012/06/14 00:39:48 [debug] 27873#0: \*13 malloc: 00000000022C7AE0:1024  
2012/06/14 00:39:48 [debug] 27873#0: \*13 SSL\_read: 1  
2012/06/14 00:39:48 [debug] 27873#0: \*13 SSL\_read: 404  
2012/06/14 00:39:48 [debug] 27873#0: \*13 SSL\_read: -1  
2012/06/14 00:39:48 [debug] 27873#0: \*13 SSL\_get\_error: 2  
2012/06/14 00:39:48 [debug] 27873#0: \*13 reusable connection: 0  
2012/06/14 00:39:48 [debug] 27873#0: \*13 malloc: 000000000224D310:1296  
2012/06/14 00:39:48 [debug] 27873#0: \*13 posix\_memalign:  
000000000228B240:4096 @16  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http process request line  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http request line: “GET  
/cgi-bin/mailman/listinfo/users HTTP/1.1”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http uri:  
“/cgi-bin/mailman/listinfo/users”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http args: “”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http exten: “”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http process request header  
line  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http header: “Host:  
[mail.sys4.de](http://mail.sys4.de)”  
2012/06/14 00:39:48 [debug] 27873#0: _13 http header: “User-Agent:  
Mozilla/5.0 (X11; Ubuntu; Linux x86\_64; rv:13.0) Gecko/20100101  
Firefox/13.0”  
2012/06/14 00:39:48 [debug] 27873#0: 13 http header: "Accept:  
text/html,application/xhtml+xml,application/xml;q=0.9,/_;q=0.8"  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http header: “Accept-Language:  
de-de,de;q=0.8,en-us;q=0.5,en;q=0.3”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http header: “Accept-Encoding:  
gzip, deflate”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http header: “DNT: 1”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http header: “Connection:  
keep-alive”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http header: “Referer:  
[mail.sys4.de Mailing Lists](https://mail.sys4.de/cgi-bin/mailman/listinfo)”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http header done  
2012/06/14 00:39:48 [debug] 27873#0: \*13 event timer del: 10:  
1339627243545  
2012/06/14 00:39:48 [debug] 27873#0: \*13 generic phase: 0  
2012/06/14 00:39:48 [debug] 27873#0: \*13 rewrite phase: 1  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http script regex: “^/$”  
2012/06/14 00:39:48 [notice] 27873#0: \*13 “^/$” does not match  
“/cgi-bin/mailman/listinfo/users”, client: 178.27.33.0, server:  
[mail.sys4.de](http://mail.sys4.de), request: “GET /cgi-bin/mailman/listinfo/users HTTP/1.1”,  
host: “[mail.sys4.de](http://mail.sys4.de)”, referrer:  
“[mail.sys4.de Mailing Lists](https://mail.sys4.de/cgi-bin/mailman/listinfo)”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 test location:  
“/images/mailman”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 test location:  
“/cgi-bin/mailman”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 using configuration  
“/cgi-bin/mailman”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http cl:-1 max:1048576  
2012/06/14 00:39:48 [debug] 27873#0: \*13 rewrite phase: 3  
2012/06/14 00:39:48 [debug] 27873#0: \*13 post rewrite phase: 4  
2012/06/14 00:39:48 [debug] 27873#0: \*13 generic phase: 5  
2012/06/14 00:39:48 [debug] 27873#0: \*13 generic phase: 6  
2012/06/14 00:39:48 [debug] 27873#0: \*13 generic phase: 7  
2012/06/14 00:39:48 [debug] 27873#0: \*13 access phase: 8  
2012/06/14 00:39:48 [debug] 27873#0: \*13 access phase: 9  
2012/06/14 00:39:48 [debug] 27873#0: \*13 access phase: 10  
2012/06/14 00:39:48 [debug] 27873#0: \*13 post access phase: 11  
2012/06/14 00:39:48 [debug] 27873#0: \*13 posix\_memalign:  
00000000022D15A0:4096 @16  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http init upstream, client  
timer: 0  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http script copy:  
“QUERY\_STRING”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 fastcgi param: "QUERY\_STRING: "  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http script copy:  
“REQUEST\_METHOD”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http script var: “GET”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 fastcgi param: “REQUEST\_METHOD:  
GET”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http script copy:  
“CONTENT\_TYPE”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 fastcgi param: "CONTENT\_TYPE: "  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http script copy:  
“CONTENT\_LENGTH”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 fastcgi param: “CONTENT\_LENGTH:  
"  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http script copy:  
“SCRIPT\_FILENAME”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http script var:  
“/usr/lib/cgi-bin/mailman/listinfo/users”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 fastcgi param:  
“SCRIPT\_FILENAME: /usr/lib/cgi-bin/mailman/listinfo/users”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http script copy: “SCRIPT\_NAME”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http script var:  
“/cgi-bin/mailman/listinfo”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 fastcgi param: “SCRIPT\_NAME:  
/cgi-bin/mailman/listinfo”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http script copy: “REQUEST\_URI”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http script var:  
“/cgi-bin/mailman/listinfo/users”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 fastcgi param: “REQUEST\_URI:  
/cgi-bin/mailman/listinfo/users”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http script copy:  
“DOCUMENT\_URI”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http script var:  
“/cgi-bin/mailman/listinfo/users”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 fastcgi param: “DOCUMENT\_URI:  
/cgi-bin/mailman/listinfo/users”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http script copy:  
“DOCUMENT\_ROOT”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http script var: “/usr/lib”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 fastcgi param: “DOCUMENT\_ROOT:  
/usr/lib”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http script copy:  
“SERVER\_PROTOCOL”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http script var: “HTTP/1.1”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 fastcgi param:  
“SERVER\_PROTOCOL: HTTP/1.1”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http script copy:  
“GATEWAY\_INTERFACE”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http script copy: “CGI/1.1”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 fastcgi param:  
“GATEWAY\_INTERFACE: CGI/1.1”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http script copy:  
“SERVER\_SOFTWARE”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http script copy: “nginx/”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http script var: “1.1.19”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 fastcgi param:  
“SERVER\_SOFTWARE: nginx/1.1.19”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http script copy: “REMOTE\_ADDR”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http script var: “178.27.33.0”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 fastcgi param: “REMOTE\_ADDR:  
178.27.33.0”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http script copy: “REMOTE\_PORT”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http script var: “35670”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 fastcgi param: “REMOTE\_PORT:  
35670”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http script copy: “SERVER\_ADDR”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http script var:  
“194.126.158.57”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 fastcgi param: “SERVER\_ADDR:  
194.126.158.57”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http script copy: “SERVER\_PORT”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http script var: “443”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 fastcgi param: “SERVER\_PORT:  
443”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http script copy: “SERVER\_NAME”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http script var: “[mail.sys4.de](http://mail.sys4.de)”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 fastcgi param: “SERVER\_NAME:  
[mail.sys4.de](http://mail.sys4.de)”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http script copy: “HTTPS”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http script var: “on”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 fastcgi param: “HTTPS: on”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http script copy:  
“REDIRECT\_STATUS”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http script copy: “200”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 fastcgi param:  
“REDIRECT\_STATUS: 200”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http script copy:  
“SCRIPT\_FILENAME”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http script var: “/usr/lib”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http script var:  
“/cgi-bin/mailman/listinfo”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 fastcgi param:  
“SCRIPT\_FILENAME: /usr/lib/cgi-bin/mailman/listinfo”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http script copy: “PATH\_INFO”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http script var: “/users”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 fastcgi param: “PATH\_INFO:  
/users”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http script copy:  
“PATH\_TRANSLATED”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http script var: “/usr/lib”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http script var: “/users”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 fastcgi param:  
“PATH\_TRANSLATED: /usr/lib/users”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 fastcgi param: “HTTP\_HOST:  
[mail.sys4.de](http://mail.sys4.de)”  
2012/06/14 00:39:48 [debug] 27873#0: _13 fastcgi param:  
“HTTP\_USER\_AGENT: Mozilla/5.0 (X11; Ubuntu; Linux x86\_64; rv:13.0)  
Gecko/20100101 Firefox/13.0”  
2012/06/14 00:39:48 [debug] 27873#0: 13 fastcgi param: "HTTP\_ACCEPT:  
text/html,application/xhtml+xml,application/xml;q=0.9,/_;q=0.8”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 fastcgi param:  
“HTTP\_ACCEPT\_LANGUAGE: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 fastcgi param:  
“HTTP\_ACCEPT\_ENCODING: gzip, deflate”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 fastcgi param: “HTTP\_DNT: 1”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 fastcgi param:  
“HTTP\_CONNECTION: keep-alive”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 fastcgi param: “HTTP\_REFERER:  
[mail.sys4.de Mailing Lists](https://mail.sys4.de/cgi-bin/mailman/listinfo)”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http cleanup add:  
00000000022D1C08  
2012/06/14 00:39:48 [debug] 27873#0: \*13 get rr peer, try: 1  
2012/06/14 00:39:48 [debug] 27873#0: \*13 socket 12  
2012/06/14 00:39:48 [debug] 27873#0: \*13 epoll add connection: fd:12  
ev:80000005  
2012/06/14 00:39:48 [debug] 27873#0: \*13 connect to  
unix:/var/run/fcgiwrap.socket, fd:12 #15  
2012/06/14 00:39:48 [debug] 27873#0: \*13 connected  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http upstream connect: 0  
2012/06/14 00:39:48 [debug] 27873#0: \*13 posix\_memalign:  
00000000022C7130:128 @16  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http upstream send request  
2012/06/14 00:39:48 [debug] 27873#0: \*13 chain writer buf fl:0 s:1008  
2012/06/14 00:39:48 [debug] 27873#0: \*13 chain writer in:  
00000000022D1C40  
2012/06/14 00:39:48 [debug] 27873#0: \*13 writev: 1008  
2012/06/14 00:39:48 [debug] 27873#0: \*13 chain writer out:  
0000000000000000  
2012/06/14 00:39:48 [debug] 27873#0: \*13 event timer add: 12:  
60000:1339627248804  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http finalize request: -4,  
“/cgi-bin/mailman/listinfo/users?” a:1, c:2  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http request count:2 blk:0  
2012/06/14 00:39:48 [debug] 27873#0: \*13 post event 00000000022A6328  
2012/06/14 00:39:48 [debug] 27873#0: \*13 delete posted event  
00000000022A6328  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http upstream request:  
“/cgi-bin/mailman/listinfo/users?”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http upstream dummy handler  
2012/06/14 00:39:48 [debug] 27873#0: \*13 post event 00000000022A6328  
2012/06/14 00:39:48 [debug] 27873#0: \*13 delete posted event  
00000000022A6328  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http upstream request:  
“/cgi-bin/mailman/listinfo/users?”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http upstream dummy handler  
2012/06/14 00:39:48 [debug] 27873#0: \*13 post event 0000000002292B18  
2012/06/14 00:39:48 [debug] 27873#0: \*13 post event 00000000022A6328  
2012/06/14 00:39:48 [debug] 27873#0: \*13 delete posted event  
00000000022A6328  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http upstream request:  
“/cgi-bin/mailman/listinfo/users?”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http upstream dummy handler  
2012/06/14 00:39:48 [debug] 27873#0: \*13 delete posted event  
0000000002292B18  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http upstream request:  
“/cgi-bin/mailman/listinfo/users?”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http upstream process header  
2012/06/14 00:39:48 [debug] 27873#0: \*13 malloc: 00000000022525C0:4096  
2012/06/14 00:39:48 [debug] 27873#0: \*13 recv: fd:12 176 of 4096  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi record byte: 01  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi record byte: 07  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi record byte: 00  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi record byte: 01  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi record byte: 00  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi record byte: 45  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi record byte: 03  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi record byte: 00  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi record length: 69  
2012/06/14 00:39:48 [error] 27873#0: \*13 FastCGI sent in stderr: “Cannot  
chdir to script directory (/usr/lib/cgi-bin/mailman/listinfo)” while  
reading response header from upstream, client: 178.27.33.0, server:  
[mail.sys4.de](http://mail.sys4.de), request: “GET /cgi-bin/mailman/listinfo/users HTTP/1.1”,  
upstream: “fastcgi://unix:/var/run/fcgiwrap.socket:”, host:  
“[mail.sys4.de](http://mail.sys4.de)”, referrer:  
“[mail.sys4.de Mailing Lists](https://mail.sys4.de/cgi-bin/mailman/listinfo)”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi record byte: 01  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi record byte: 07  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi record byte: 00  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi record byte: 01  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi record byte: 00  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi record byte: 00  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi record byte: 00  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi record byte: 00  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi record length: 0  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi record byte: 01  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi record byte: 06  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi record byte: 00  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi record byte: 01  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi record byte: 00  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi record byte: 33  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi record byte: 05  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi record byte: 00  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi record length: 51  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi parser: 0  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi header: “Status:  
403 Forbidden”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi parser: 0  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi header:  
“Content-type: text/plain”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi parser: 1  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi header done  
2012/06/14 00:39:48 [debug] 27873#0: \*13 xslt filter header  
2012/06/14 00:39:48 [debug] 27873#0: \*13 HTTP/1.1 403 Forbidden  
Server: nginx/1.1.19  
Date: Wed, 13 Jun 2012 22:39:48 GMT  
Content-Type: text/plain  
Transfer-Encoding: chunked  
Connection: keep-alive

2012/06/14 00:39:48 [debug] 27873#0: \*13 write new buf t:1 f:0  
00000000022D1E90, pos 00000000022D1E90, size: 163 file: 0, size: 0  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http write filter: l:0 f:0  
s:163  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http cacheable: 0  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http upstream process upstream  
2012/06/14 00:39:48 [debug] 27873#0: \*13 pipe read upstream: 1  
2012/06/14 00:39:48 [debug] 27873#0: \*13 pipe preread: 32  
2012/06/14 00:39:48 [debug] 27873#0: \*13 readv: 1:3920  
2012/06/14 00:39:48 [debug] 27873#0: \*13 pipe recv chain: 0  
2012/06/14 00:39:48 [debug] 27873#0: \*13 pipe buf free s:0 t:1 f:0  
00000000022525C0, pos 0000000002252650, size: 32 file: 0, size: 0  
2012/06/14 00:39:48 [debug] 27873#0: \*13 pipe length: -1  
2012/06/14 00:39:48 [debug] 27873#0: \*13 input buf #0 0000000002252650  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi record byte: 01  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi record byte: 06  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi record byte: 00  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi record byte: 01  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi record byte: 00  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi record byte: 00  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi record byte: 00  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi record byte: 00  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi record length: 0  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi closed stdout  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi record byte: 01  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi record byte: 03  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi record byte: 00  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi record byte: 01  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi record byte: 00  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi record byte: 08  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi record byte: 00  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi record byte: 00  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi record length: 8  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi sent end request  
2012/06/14 00:39:48 [debug] 27873#0: \*13 input buf 0000000002252650 3  
2012/06/14 00:39:48 [debug] 27873#0: \*13 pipe write downstream: 1  
2012/06/14 00:39:48 [debug] 27873#0: \*13 pipe write downstream flush in  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http output filter  
“/cgi-bin/mailman/listinfo/users?”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http copy filter:  
“/cgi-bin/mailman/listinfo/users?”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 image filter  
2012/06/14 00:39:48 [debug] 27873#0: \*13 xslt filter body  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http postpone filter  
“/cgi-bin/mailman/listinfo/users?” 00000000022D20A0  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http chunk: 3  
2012/06/14 00:39:48 [debug] 27873#0: \*13 write old buf t:1 f:0  
00000000022D1E90, pos 00000000022D1E90, size: 163 file: 0, size: 0  
2012/06/14 00:39:48 [debug] 27873#0: \*13 write new buf t:1 f:0  
00000000022D2188, pos 00000000022D2188, size: 3 file: 0, size: 0  
2012/06/14 00:39:48 [debug] 27873#0: \*13 write new buf t:1 f:0  
00000000022525C0, pos 0000000002252650, size: 3 file: 0, size: 0  
2012/06/14 00:39:48 [debug] 27873#0: \*13 write new buf t:0 f:0  
0000000000000000, pos 000000000049DD7D, size: 2 file: 0, size: 0  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http write filter: l:0 f:0  
s:171  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http copy filter: 0  
“/cgi-bin/mailman/listinfo/users?”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 pipe write downstream done  
2012/06/14 00:39:48 [debug] 27873#0: \*13 event timer: 12, old:  
1339627248804, new: 1339627248805  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http upstream exit:  
0000000000000000  
2012/06/14 00:39:48 [debug] 27873#0: \*13 finalize http upstream request:  
0  
2012/06/14 00:39:48 [debug] 27873#0: \*13 finalize http fastcgi request  
2012/06/14 00:39:48 [debug] 27873#0: \*13 free rr peer 1 0  
2012/06/14 00:39:48 [debug] 27873#0: \*13 close http upstream connection:  
12  
2012/06/14 00:39:48 [debug] 27873#0: \*13 free: 00000000022C7130, unused:  
48  
2012/06/14 00:39:48 [debug] 27873#0: \*13 event timer del: 12:  
1339627248804  
2012/06/14 00:39:48 [debug] 27873#0: \*13 reusable connection: 0  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http upstream temp fd: -1  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http output filter  
“/cgi-bin/mailman/listinfo/users?”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http copy filter:  
“/cgi-bin/mailman/listinfo/users?”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 image filter  
2012/06/14 00:39:48 [debug] 27873#0: \*13 xslt filter body  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http postpone filter  
“/cgi-bin/mailman/listinfo/users?” 00007FFF43D71E70  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http chunk: 0  
2012/06/14 00:39:48 [debug] 27873#0: \*13 write old buf t:1 f:0  
00000000022D1E90, pos 00000000022D1E90, size: 163 file: 0, size: 0  
2012/06/14 00:39:48 [debug] 27873#0: \*13 write old buf t:1 f:0  
00000000022D2188, pos 00000000022D2188, size: 3 file: 0, size: 0  
2012/06/14 00:39:48 [debug] 27873#0: \*13 write old buf t:1 f:0  
00000000022525C0, pos 0000000002252650, size: 3 file: 0, size: 0  
2012/06/14 00:39:48 [debug] 27873#0: \*13 write old buf t:0 f:0  
0000000000000000, pos 000000000049DD7D, size: 2 file: 0, size: 0  
2012/06/14 00:39:48 [debug] 27873#0: \*13 write new buf t:0 f:0  
0000000000000000, pos 000000000049DD7A, size: 5 file: 0, size: 0  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http write filter: l:1 f:0  
s:176  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http write filter limit 0  
2012/06/14 00:39:48 [debug] 27873#0: \*13 malloc: 00000000022B9930:16384  
2012/06/14 00:39:48 [debug] 27873#0: \*13 SSL buf copy: 163  
2012/06/14 00:39:48 [debug] 27873#0: \*13 SSL buf copy: 3  
2012/06/14 00:39:48 [debug] 27873#0: \*13 SSL buf copy: 3  
2012/06/14 00:39:48 [debug] 27873#0: \*13 SSL buf copy: 2  
2012/06/14 00:39:48 [debug] 27873#0: \*13 SSL buf copy: 5  
2012/06/14 00:39:48 [debug] 27873#0: \*13 SSL to write: 176  
2012/06/14 00:39:48 [debug] 27873#0: \*13 SSL\_write: 176  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http write filter  
0000000000000000  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http copy filter: 0  
“/cgi-bin/mailman/listinfo/users?”  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http finalize request: 0,  
“/cgi-bin/mailman/listinfo/users?” a:1, c:1  
2012/06/14 00:39:48 [debug] 27873#0: \*13 set http keepalive handler  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http close request  
2012/06/14 00:39:48 [debug] 27873#0: \*13 http log handler  
2012/06/14 00:39:48 [debug] 27873#0: \*13 free: 00000000022525C0  
2012/06/14 00:39:48 [debug] 27873#0: \*13 free: 000000000228B240, unused:  
6  
2012/06/14 00:39:48 [debug] 27873#0: \*13 free: 00000000022D15A0, unused:  
444  
2012/06/14 00:39:48 [debug] 27873#0: \*13 event timer add: 10:  
65000:1339627253805  
2012/06/14 00:39:48 [debug] 27873#0: \*13 free: 000000000224D310  
2012/06/14 00:39:48 [debug] 27873#0: \*13 free: 00000000022C7AE0  
2012/06/14 00:39:48 [debug] 27873#0: \*13 hc free: 0000000000000000 0  
2012/06/14 00:39:48 [debug] 27873#0: \*13 hc busy: 0000000000000000 0  
2012/06/14 00:39:48 [debug] 27873#0: \*13 free: 00000000022B9930  
2012/06/14 00:39:48 [debug] 27873#0: \*13 reusable connection: 1

Thanks

p@rick

–  
state of mind ()

> **[p@rick](https://state-of-mind.de/)**
>
> View the blog.

Franziskanerstraße 15 Telefon +49 89 3090 4664  
81669 München Telefax +49 89 3090 4666

Amtsgericht München Partnerschaftsregister PR 563

---

<div class="post-metadata">

**Author:** ![Patrick\_Ben\_Koetter](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/aeb1de/32.png) [@Patrick\_Ben\_Koetter](https://www.ruby-forum.com/u/Patrick_Ben_Koetter)\
**Post date:** [June 14, 2012, 10:53am UTC](https://www.ruby-forum.com/t/running-mailman-within-a-domain/220598/2 "2012-06-14T10:53:50Z")

</div>

Hi Patrick,

On 14-06-2012 00:43, Patrick Ben Koetter wrote:

> receives a  
> 403 and the fast\_cgi wrapper reports:
> 
> Cannot chdir to script directory  
> (/usr/lib/cgi-bin/mailman/listinfo)" while  
> reading response header from upstream
> 
> What is it I am doing wrong?

I don’t know too much about mailman, so I try to guess.

The

/usr/lib/cgi-bin/mailman

is the script which should be executed right?

The

/listinfo  
&  
/listinfo/users

should be the path info, right?

> This is my nginx configuration to include mailman into the website:
> 
> ```
> location /cgi-bin/mailman {
> root /usr/lib/;
> 
> ```

my suggestion:

- 

```
           fastcgi_split_path_info

```

(^/cgi-bin/mailman/[^/]_)(._)$;

- 

```
           fastcgi_split_path_info (^/cgi-bin/mailman)/(.*)$;

```

> ```
> alias /usr/share/images/mailman;
> }
> location /pipermail {
> alias /var/lib/mailman/archives/public;
> autoindex on;
> }
> 
> ```

output of pcretest

### 

re\> |(^/cgi-bin/mailman)/(.\*)$|  
data\> /cgi-bin/mailman/listinfo  
0: /cgi-bin/mailman/listinfo  
1: /cgi-bin/mailman  
2: listinfo  
data\> /cgi-bin/mailman/listinfo/users  
0: /cgi-bin/mailman/listinfo/users  
1: /cgi-bin/mailman  
2: listinfo/users

### 

> /etc/nginx/fastcgi\_params contains these settings:

[snipp]

> My error log gives this output:

[snipp]

> 2012/06/14 00:39:48 [debug] 27873#0: \*13 http uri:  
> “/cgi-bin/mailman/listinfo/users”

[snipp]

> 2012/06/14 00:39:48 [debug] 27873#0: \*13 fastcgi param: "SCRIPT\_NAME:  
> “/cgi-bin/mailman/listinfo/users”  
> 2012/06/14 00:39:48 [debug] 27873#0: \*13 fastcgi param:  
> 2012/06/14 00:39:48 [debug] 27873#0: \*13 fastcgi param:  
> 2012/06/14 00:39:48 [debug] 27873#0: \*13 fastcgi param: "REMOTE\_PORT:  
> 2012/06/14 00:39:48 [debug] 27873#0: \*13 fastcgi param: "SERVER\_PORT:  
> 2012/06/14 00:39:48 [debug] 27873#0: \*13 http script copy:  
> “REDIRECT\_STATUS”  
> 2012/06/14 00:39:48 [debug] 27873#0: \*13 http script copy: “200”  
> 2012/06/14 00:39:48 [debug] 27873#0: \*13 fastcgi param:  
> “REDIRECT\_STATUS: 200”  
> 2012/06/14 00:39:48 [debug] 27873#0: \*13 http script copy:  
> “SCRIPT\_FILENAME”  
> 2012/06/14 00:39:48 [debug] 27873#0: \*13 http script var: “/usr/lib”  
> 2012/06/14 00:39:48 [debug] 27873#0: \*13 http script var:  
> “/cgi-bin/mailman/listinfo”

> 2012/06/14 00:39:48 [debug] 27873#0: \*13 fastcgi param:  
> “SCRIPT\_FILENAME: /usr/lib/cgi-bin/mailman/listinfo”

> 2012/06/14 00:39:48 [debug] 27873#0: \*13 http script copy:  
> “PATH\_INFO”  
> 2012/06/14 00:39:48 [debug] 27873#0: \*13 http script var: “/users”  
> 2012/06/14 00:39:48 [debug] 27873#0: \*13 fastcgi param: “PATH\_INFO:  
> /users”

[snipp]

> Thanks
> 
> p@rick

I’am sure you have read this but I post it here as reminder 😉

> **[Module ngx\_http\_fastcgi\_module](http://nginx.org/en/docs/http/ngx_http_fastcgi_module.html)**

Hth

Aleks

---

<div class="post-metadata">

**Author:** ![Patrick\_Ben\_Koetter](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/aeb1de/32.png) [@Patrick\_Ben\_Koetter](https://www.ruby-forum.com/u/Patrick_Ben_Koetter)\
**Post date:** [June 14, 2012, 11:17am UTC](https://www.ruby-forum.com/t/running-mailman-within-a-domain/220598/3 "2012-06-14T11:17:48Z")

</div>

Hi,

if you use Debian or Ubuntu, you can get nginx to work with Mailman as  
follows:

[http://www.howtoforge.com/running-mailman-on-nginx-lemp-on-debian-squeeze-ubuntu-11.04-11.10](http://www.howtoforge.com/running-mailman-on-nginx-lemp-on-debian-squeeze-ubuntu-11.04-11.10)

Best Regards,

Falko T.

Ovelgönner Weg 43  
21335 Lüneburg  
Germany  
Email: removed\_email\_address@domain.invalid  
URL: [http://www.falkotimme.com](http://www.falkotimme.com)

Projects:  
Timme Hosting: [https://timmehosting.de](https://timmehosting.de)  
ISPConfig: [http://www.ispconfig.org](http://www.ispconfig.org)  
HowtoForge: [http://www.howtoforge.com](http://www.howtoforge.com)

----- Original Message -----  
From: “Patrick Ben Koetter” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
To: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Sent: Thursday, June 14, 2012 12:43 AM  
Subject: Running mailman within a domain

---

<div class="post-metadata">

**Author:** ![Patrick\_Ben\_Koetter](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/aeb1de/32.png) [@Patrick\_Ben\_Koetter](https://www.ruby-forum.com/u/Patrick_Ben_Koetter)\
**Post date:** [June 14, 2012, 1:18pm UTC](https://www.ruby-forum.com/t/running-mailman-within-a-domain/220598/4 "2012-06-14T13:18:47Z")

</div>

Hi Aleksandar,

- Aleksandar L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> Hi Patrick,

we seem to meet on the same lists, do we? 🙂

> > (/usr/lib/cgi-bin/mailman/listinfo)" while reading response header from
> 
> is the script which should be executed right?

Nope. It would be this:

/usr/lib/cgi-bin/mailman//

> /listinfo  
> &  
> /listinfo/users
> 
> should be the path info, right?

I’d say it should be ‘users’ only.

> > ```
> > fastcgi_param SCRIPT_FILENAME
> > location /pipermail {
> > 
> > ```
> 
> 1: /cgi-bin/mailman  
> 2: listinfo  
> data\> /cgi-bin/mailman/listinfo/users  
> 0: /cgi-bin/mailman/listinfo/users  
> 1: /cgi-bin/mailman  
> 2: listinfo/users
> 
> ###

pcretest  
PCRE version 7.8 2008-09-05

re\> |(^/cgi-bin/mailman/[^/]_)(._)$|  
data\> /cgi-bin/mailman/listinfo  
0: /cgi-bin/mailman/listinfo  
1: /cgi-bin/mailman/listinfo  
2:  
data\> /cgi-bin/mailman/listinfo/users  
0: /cgi-bin/mailman/listinfo/users  
1: /cgi-bin/mailman/listinfo  
2: /users

Looks to me as if the leading / at users was wrong.

> I’am sure you have read this but I post it here as reminder 😉

> **[Module ngx\_http\_fastcgi\_module](http://nginx.org/en/docs/http/ngx_http_fastcgi_module.html)**

Thx. Read it now.

p@

–  
state of mind ()

[http://www.state-of-mind.de](http://www.state-of-mind.de)

Franziskanerstraße 15 Telefon +49 89 3090 4664  
81669 München Telefax +49 89 3090 4666

Amtsgericht München Partnerschaftsregister PR 563

---

<div class="post-metadata">

**Author:** ![Patrick\_Ben\_Koetter](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/aeb1de/32.png) [@Patrick\_Ben\_Koetter](https://www.ruby-forum.com/u/Patrick_Ben_Koetter)\
**Post date:** [June 14, 2012, 3:26pm UTC](https://www.ruby-forum.com/t/running-mailman-within-a-domain/220598/5 "2012-06-14T15:26:47Z")

</div>

On 14.06.2012, at 2:43, Patrick Ben Koetter wrote:

> Cannot chdir to script directory (/usr/lib/cgi-bin/mailman/listinfo)" while  
> reading response header from upstream

Could you create /usr/lib/cgi-bin/mailman/printenv script with the  
following content:

#!/usr/bin/perl  
print “Content-type: text/plain\n\n”;  
foreach $var (sort(keys(%ENV))) {  
$val = $ENV{$var};  
print “${var}="${val}"\n”;  
}

Then run chmod +x /usr/lib/cgi-bin/mailman/printenv  
and send result of the query  
[http://mail.sys4.de/cgi-bin/mailman/printenv/blah-blah-blah](http://mail.sys4.de/cgi-bin/mailman/printenv/blah-blah-blah).  
If your config is correct, there should be  
SCRIPT\_FILENAME=“/usr/lib/cgi-bin/mailman/printenv”  
PATH\_INFO=“/blah-blah-blah”

BTW PATH\_TRANSLATED in your config is unnecessary and erroneous.

---

<div class="post-metadata">

**Author:** ![Patrick\_Ben\_Koetter](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/aeb1de/32.png) [@Patrick\_Ben\_Koetter](https://www.ruby-forum.com/u/Patrick_Ben_Koetter)\
**Post date:** [June 14, 2012, 12:46pm UTC](https://www.ruby-forum.com/t/running-mailman-within-a-domain/220598/6 "2012-06-14T12:46:04Z")

</div>

Hi Falko,

- Falko T. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> if you use Debian or Ubuntu, you can get nginx to work with Mailman  
> as follows:

> **[Running Mailman On Nginx (LEMP) On Debian Squeeze/Ubuntu 11.04/11.10](https://www.howtoforge.com/running-mailman-on-nginx-lemp-on-debian-squeeze-ubuntu-11.04-11.10)**
>
> Running Mailman On Nginx (LEMP) On Debian Squeeze/Ubuntu 11.04/11.10
> 
> The Mailman package from the Debian/Ubuntu repositories comes with a 
> configu...

I had already followed your HOWTO, but it doesn’t seem to work for  
Ubuntu  
12.04 LTS - at least not for me.

Any ideas how I could debug this better?

p@rick

> > (/usr/lib/cgi-bin/mailman/listinfo)" while  
> > fastcgi\_split\_path\_info (^/cgi-bin/mailman/[^/]_)(._)$;  
> > alias /usr/share/images/mailman;  
> > fastcgi\_param CONTENT\_TYPE $content\_type;  
> > fastcgi\_param SERVER\_SOFTWARE nginx/$nginx\_version;  
> > fastcgi\_param REDIRECT\_STATUS 200;  
> > 2012/06/14 00:39:48 [debug] 27873#0: \*13 delete posted event  
> > 000000000228B240:4096 @16  
> > Mozilla/5.0 (X11; Ubuntu; Linux x86\_64; rv:13.0) Gecko/20100101  
> > 2012/06/14 00:39:48 [debug] 27873#0: \*13 http header: “Referer:  
> > HTTP/1.1”, host: “[mail.sys4.de](http://mail.sys4.de)”, referrer:  
> > 2012/06/14 00:39:48 [debug] 27873#0: \*13 generic phase: 7  
> > 2012/06/14 00:39:48 [debug] 27873#0: \*13 http script copy:  
> > “SCRIPT\_FILENAME”  
> > 2012/06/14 00:39:48 [debug] 27873#0: \*13 http script var:  
> > 2012/06/14 00:39:48 [debug] 27873#0: \*13 fastcgi param:  
> > “GATEWAY\_INTERFACE: CGI/1.1”  
> > 2012/06/14 00:39:48 [debug] 27873#0: \*13 http script copy: “REMOTE\_PORT”  
> > 2012/06/14 00:39:48 [debug] 27873#0: \*13 http script copy: “SERVER\_NAME”  
> > “REDIRECT\_STATUS: 200”  
> > “PATH\_INFO: /users”  
> > Gecko/20100101 Firefox/13.0"  
> > 2012/06/14 00:39:48 [debug] 27873#0: \*13 fastcgi param:  
> > 2012/06/14 00:39:48 [debug] 27873#0: \*13 http upstream connect: 0  
> > 2012/06/14 00:39:48 [debug] 27873#0: \*13 http finalize request:  
> > 00000000022A6328  
> > 2012/06/14 00:39:48 [debug] 27873#0: \*13 delete posted event  
> > 2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi record byte: 00  
> > referrer: “[mail.sys4.de Mailing Lists](https://mail.sys4.de/cgi-bin/mailman/listinfo)”  
> > 2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi record byte: 06  
> > 2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi parser: 0  
> > Connection: keep-alive  
> > 2012/06/14 00:39:48 [debug] 27873#0: \*13 pipe buf free s:0 t:1 f:0  
> > 2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi record byte: 00  
> > 2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi record length: 8  
> > 2012/06/14 00:39:48 [debug] 27873#0: \*13 http postpone filter  
> > 2012/06/14 00:39:48 [debug] 27873#0: \*13 http write filter: l:0 f:0 s:171  
> > 2012/06/14 00:39:48 [debug] 27873#0: \*13 close http upstream  
> > “/cgi-bin/mailman/listinfo/users?”  
> > 00000000022525C0, pos 0000000002252650, size: 3 file: 0, size: 0  
> > 2012/06/14 00:39:48 [debug] 27873#0: \*13 SSL buf copy: 2  
> > 2012/06/14 00:39:48 [debug] 27873#0: \*13 http close request  
> > 2012/06/14 00:39:48 [debug] 27873#0: \*13 hc busy: 0000000000000000 0
> > 
> > [mailman.nginx.org archive](http://mailman.nginx.org/mailman/listinfo/nginx)
> 
> * * *
> 
> nginx mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [mailman.nginx.org archive](http://mailman.nginx.org/mailman/listinfo/nginx)

–  
state of mind ()

[http://www.state-of-mind.de](http://www.state-of-mind.de)

Franziskanerstraße 15 Telefon +49 89 3090 4664  
81669 München Telefax +49 89 3090 4666

Amtsgericht München Partnerschaftsregister PR 563

---

<div class="post-metadata">

**Author:** ![Patrick\_Ben\_Koetter](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/aeb1de/32.png) [@Patrick\_Ben\_Koetter](https://www.ruby-forum.com/u/Patrick_Ben_Koetter)\
**Post date:** [June 14, 2012, 4:46pm UTC](https://www.ruby-forum.com/t/running-mailman-within-a-domain/220598/7 "2012-06-14T16:46:16Z")

</div>

On 14.06.2012, at 17:29, Patrick Ben Koetter wrote:

> Give this output: [https://mail.sys4.de/cgi-bin/mailman/printenv](https://mail.sys4.de/cgi-bin/mailman/printenv)
> 
> > Then run chmod +x /usr/lib/cgi-bin/mailman/printenv  
> > and send result of the query  
> > [http://mail.sys4.de/cgi-bin/mailman/printenv/blah-blah-blah](http://mail.sys4.de/cgi-bin/mailman/printenv/blah-blah-blah).  
> > If your config is correct, there should be  
> > SCRIPT\_FILENAME=“/usr/lib/cgi-bin/mailman/printenv”  
> > PATH\_INFO=“/blah-blah-blah”
> 
> Gives a temp error: 403  
> [https://mail.sys4.de/cgi-bin/mailman/printenv/blah-blah-blah](https://mail.sys4.de/cgi-bin/mailman/printenv/blah-blah-blah)

Please comment string  
fastcgi\_param SCRIPT\_FILENAME $request\_filename;

in /etc/nginx/fastcgi\_params and reload nginx

---

<div class="post-metadata">

**Author:** ![Patrick\_Ben\_Koetter](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/aeb1de/32.png) [@Patrick\_Ben\_Koetter](https://www.ruby-forum.com/u/Patrick_Ben_Koetter)\
**Post date:** [June 14, 2012, 5:07pm UTC](https://www.ruby-forum.com/t/running-mailman-within-a-domain/220598/8 "2012-06-14T17:07:54Z")

</div>

Hello,  
I have found out that running MailMan behind nginx is so much easier  
with  
thttpd in between (and proxy\_pass) rather than all kinds of cgi  
wrappers.  
It takes like a minute to set up and works flawlesly -  
[http://wiki.list.org/display/DOC/Mailman+and+nginx](http://wiki.list.org/display/DOC/Mailman+and+nginx)

my 2 cents.

rr

---

<div class="post-metadata">

**Author:** ![Patrick\_Ben\_Koetter](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/aeb1de/32.png) [@Patrick\_Ben\_Koetter](https://www.ruby-forum.com/u/Patrick_Ben_Koetter)\
**Post date:** [June 14, 2012, 5:14pm UTC](https://www.ruby-forum.com/t/running-mailman-within-a-domain/220598/9 "2012-06-14T17:14:55Z")

</div>

- Sergey B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> fastcgi\_param SCRIPT\_FILENAME $request\_filename;
> 
> in /etc/nginx/fastcgi\_params and reload nginx

Sergey, you just made my day. Thank you! Everything works now as  
expected.

p@rick

–  
state of mind ()

[http://www.state-of-mind.de](http://www.state-of-mind.de)

Franziskanerstraße 15 Telefon +49 89 3090 4664  
81669 München Telefax +49 89 3090 4666

Amtsgericht München Partnerschaftsregister PR 563

---

<div class="post-metadata">

**Author:** ![Patrick\_Ben\_Koetter](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/aeb1de/32.png) [@Patrick\_Ben\_Koetter](https://www.ruby-forum.com/u/Patrick_Ben_Koetter)\
**Post date:** [June 14, 2012, 3:29pm UTC](https://www.ruby-forum.com/t/running-mailman-within-a-domain/220598/10 "2012-06-14T15:29:43Z")

</div>

- Sergey B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> > [https://mail.sys4.de/cgi-bin/mailman/listinfo/users](https://mail.sys4.de/cgi-bin/mailman/listinfo/users). The Browser receives a  
> > $val = $ENV{$var};  
> > print “${var}="${val}"\n”;  
> > }

Give this output: [https://mail.sys4.de/cgi-bin/mailman/printenv](https://mail.sys4.de/cgi-bin/mailman/printenv)

> Then run chmod +x /usr/lib/cgi-bin/mailman/printenv  
> and send result of the query  
> [http://mail.sys4.de/cgi-bin/mailman/printenv/blah-blah-blah](http://mail.sys4.de/cgi-bin/mailman/printenv/blah-blah-blah).  
> If your config is correct, there should be  
> SCRIPT\_FILENAME=“/usr/lib/cgi-bin/mailman/printenv”  
> PATH\_INFO=“/blah-blah-blah”

Gives a temp error: 403  
[https://mail.sys4.de/cgi-bin/mailman/printenv/blah-blah-blah](https://mail.sys4.de/cgi-bin/mailman/printenv/blah-blah-blah)

> BTW PATH\_TRANSLATED in your config is unnecessary and erroneous.

Okay. I’ll drop it.

p@rick

> > ```
> > root /usr/lib/;
> > }
> > 
> > ```
> > 
> > fastcgi\_param CONTENT\_LENGTH $content\_length;
> > 
> > 2012/06/14 00:39:48 [debug] 27873#0: \*13 malloc: 00000000022C7AE0:1024  
> > 2012/06/14 00:39:48 [debug] 27873#0: \*13 http args: “”  
> > 2012/06/14 00:39:48 [debug] 27873#0: \*13 http header done  
> > 2012/06/14 00:39:48 [debug] 27873#0: \*13 post rewrite phase: 4  
> > 2012/06/14 00:39:48 [debug] 27873#0: \*13 fastcgi param: "QUERY\_STRING: "  
> > 2012/06/14 00:39:48 [debug] 27873#0: \*13 http script copy: “SCRIPT\_NAME”  
> > 2012/06/14 00:39:48 [debug] 27873#0: \*13 fastcgi param: “DOCUMENT\_ROOT:  
> > /usr/lib”  
> > 2012/06/14 00:39:48 [debug] 27873#0: \*13 http script copy: “REMOTE\_ADDR”  
> > 2012/06/14 00:39:48 [debug] 27873#0: \*13 fastcgi param: “SERVER\_PORT: 443”  
> > 2012/06/14 00:39:48 [debug] 27873#0: \*13 http script var: “/usr/lib”  
> > 2012/06/14 00:39:48 [debug] 27873#0: \*13 fastcgi param: “HTTP\_USER\_AGENT:  
> > Mozilla/5.0 (X11; Ubuntu; Linux x86\_64; rv:13.0) Gecko/20100101 Firefox/13.0”  
> > 2012/06/14 00:39:48 [debug] 27873#0: \*13 connect to  
> > unix:/var/run/fcgiwrap.socket, fd:12 #15  
> > 2012/06/14 00:39:48 [debug] 27873#0: \*13 http request count:2 blk:0  
> > 2012/06/14 00:39:48 [debug] 27873#0: \*13 delete posted event 00000000022A6328  
> > 2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi record byte: 01  
> > 2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi record byte: 00  
> > 2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi record byte: 05  
> > Server: nginx/1.1.19  
> > 2012/06/14 00:39:48 [debug] 27873#0: \*13 pipe preread: 32  
> > 2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi record byte: 00  
> > 2012/06/14 00:39:48 [debug] 27873#0: \*13 http fastcgi record byte: 00  
> > 2012/06/14 00:39:48 [debug] 27873#0: \*13 http postpone filter  
> > “/cgi-bin/mailman/listinfo/users?” 00000000022D20A0  
> > 2012/06/14 00:39:48 [debug] 27873#0: \*13 finalize http upstream request: 0  
> > 2012/06/14 00:39:48 [debug] 27873#0: \*13 xslt filter body  
> > 2012/06/14 00:39:48 [debug] 27873#0: \*13 SSL buf copy: 163  
> > 2012/06/14 00:39:48 [debug] 27873#0: \*13 http close request  
> > 2012/06/14 00:39:48 [debug] 27873#0: \*13 reusable connection: 1
> 
> * * *
> 
> nginx mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [mailman.nginx.org archive](http://mailman.nginx.org/mailman/listinfo/nginx)

–  
state of mind ()

[http://www.state-of-mind.de](http://www.state-of-mind.de)

Franziskanerstraße 15 Telefon +49 89 3090 4664  
81669 München Telefax +49 89 3090 4666

Amtsgericht München Partnerschaftsregister PR 563

---

<div class="post-metadata">

**Author:** ![Patrick\_Ben\_Koetter](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/aeb1de/32.png) [@Patrick\_Ben\_Koetter](https://www.ruby-forum.com/u/Patrick_Ben_Koetter)\
**Post date:** [June 14, 2012, 11:59pm UTC](https://www.ruby-forum.com/t/running-mailman-within-a-domain/220598/11 "2012-06-14T23:59:57Z")

</div>

On Thu, Jun 14, 2012 at 05:14:26PM +0200, Patrick Ben Koetter wrote:

> - Sergey B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

Hi there,

> > Please comment string  
> > fastcgi\_param SCRIPT\_FILENAME $request\_filename;
> > 
> > in /etc/nginx/fastcgi\_params and reload nginx
> 
> Sergey, you just made my day. Thank you! Everything works now as expected.

If I read it right, that suggests that your fastcgi server pays  
attention  
to the first SCRIPT\_FILENAME parameter it gets, in contrast to the php  
built-in fastcgi server which pays attention to the last one it gets.

So an alternative config could have been to use the original  
fastcgi\_params file; but to add your own SCRIPT\_FILENAME line above,  
rather than below, the include line.

What you have now, sending exactly one fastcgi SCRIPT\_FILENAME  
parameter,  
is best because it should work for any fastcgi server.

(Your original config might have worked if you used a different fastcgi  
server.)

All the best,

## f

Francis D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
