|
View:
New views
8 Messages
—
Rating Filter:
Alert me
|
|
|
nginx + fcgiwrap, web interface problemsHi all,
I am trying to configure Mailman on a system using nginx, and fcgiwrap for CGI, according to this guide: http://wiki.nginx.org/Mailman After doing so, I have a problem: The main listinfo page displays, and shows my public lists, but all other links redirect back to listinfo. I can't get to any specific list information page, and I can't get to any parts of the admin for any list. I have run check_perms and nothing is wrong there. There are no errors reported in the web server logs. I suspect that this might be something to do with nginx's fastcgi proxying or something, but I haven't been able to find any solutions. The server is a VPS with several virtual hosts. Mailman works properly, and I can access the admin interface for all the lists using Virtualmin's wrapper script. Of course, I can't give my list moderators the Virtualmin password, so there's still a problem ;-) My nginx config looks like: http://pastebin.com/UzF7bViq Has anyone reading this been successful with Mailman + nginx using fcgiwrap and virtual hosts? Best, Jon ------------------------------------------------------ Mailman-Users mailing list Mailman-Users@... http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/lists%40nabble.com |
|
|
Re: nginx + fcgiwrap, web interface problemsJon Evans wrote:
> >I am trying to configure Mailman on a system using nginx, and fcgiwrap for >CGI, according to this guide: http://wiki.nginx.org/Mailman > >After doing so, I have a problem: The main listinfo page displays, and >shows my public lists, but all other links redirect back to listinfo. I >can't get to any specific list information page, and I can't get to any >parts of the admin for any list. Caveat - I know virtually nothing about nginx, fcgiwrap and fastcgi. It appears that PATH_INFO is not properly set (actually not set at all) in the environment passed to the Mailman CGIs. A URL like http://www.example.com/mailman/sss/aaa/bbb/ccc should invoke the Mailman CGI named sss and pass PATH_INFO=/aaa/bbb/ccc. >From what I see in your nginx config, things like fastcgi_split_path_info (^/mailman/[^/]*)(.*)$; and fastcgi_param PATH_INFO $fastcgi_path_info; should do this, but compared to the guide at http://wiki.nginx.org/Mailman you are missing include fastcgi_params; which could be the problem. When you go to an 'admin' URL, do you get the admin overview page? This would be consistent with missing PATH_INFO. -- Mark Sapiro <mark@...> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan ------------------------------------------------------ Mailman-Users mailing list Mailman-Users@... http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/lists%40nabble.com |
|
|
Re: nginx + fcgiwrap, web interface problemsWhen I go to an 'admin' URL, I get the admin overview like you say. It
would appear that your diagnosis is correct, no arguments are getting passed to any of the CGI scripts. I replaced "include fastcgi_params;" with the large list of individual params for debugging purposes. I have a new pastebin ( http://pastebin.com/N5C66FpP) that shows the difference between nginx's fastcgi_params include and what is in my config. There is nothing missing from my config, in other words. I just tested the regex, and it seems to appropriately split the path into, for example, PATH_INFO = /list-name/admin PATH_TRANSLATED = /usr/lib/cgi-bin/mailman/admin/list-name/admin SCRIPT_FILENAME = /usr/lib/cgi-bin/mailman/admin I will keep playing with the variables and see if I get anywhere. Thanks for the leads! Jon On Wed, Sep 15, 2010 at 10:56 AM, Mark Sapiro <mark@...> wrote: > Jon Evans wrote: > > > >I am trying to configure Mailman on a system using nginx, and fcgiwrap for > >CGI, according to this guide: http://wiki.nginx.org/Mailman > > > >After doing so, I have a problem: The main listinfo page displays, and > >shows my public lists, but all other links redirect back to listinfo. I > >can't get to any specific list information page, and I can't get to any > >parts of the admin for any list. > > > Caveat - I know virtually nothing about nginx, fcgiwrap and fastcgi. > > It appears that PATH_INFO is not properly set (actually not set at all) > in the environment passed to the Mailman CGIs. A URL like > > http://www.example.com/mailman/sss/aaa/bbb/ccc > > should invoke the Mailman CGI named sss and pass PATH_INFO=/aaa/bbb/ccc. > > From what I see in your nginx config, things like > > fastcgi_split_path_info (^/mailman/[^/]*)(.*)$; > and > fastcgi_param PATH_INFO $fastcgi_path_info; > > should do this, but compared to the guide at > http://wiki.nginx.org/Mailman you are missing > > include fastcgi_params; > > which could be the problem. > > > When you go to an 'admin' URL, do you get the admin overview page? This > would be consistent with missing PATH_INFO. > > -- > Mark Sapiro <mark@...> The highway is for gamblers, > San Francisco Bay Area, California better use your sense - B. Dylan > > Mailman-Users mailing list Mailman-Users@... http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/lists%40nabble.com |
|
|
Re: nginx + fcgiwrap, web interface problemsJon Evans wrote:
> >When I go to an 'admin' URL, I get the admin overview like you say. It > >I just tested the regex, and it seems to appropriately split the path into, >for example, >PATH_INFO = /list-name/admin >PATH_TRANSLATED = /usr/lib/cgi-bin/mailman/admin/list-name/admin >SCRIPT_FILENAME = /usr/lib/cgi-bin/mailman/admin What was the actual URL in this case? The above seems strange. If the URL is http://host/mailman/admin/list-name/admin, then PATH_INFO seems right, but that's an unusual URL. Also, PATH_TRANSLATED and SCRIPT_FILENAME are unusual, but if your Mailman CGI wrappers are actually in /usr/lib/cgi-bin/mailman/, then that seems OK. -- Mark Sapiro <mark@...> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan ------------------------------------------------------ Mailman-Users mailing list Mailman-Users@... http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/lists%40nabble.com |
|
|
Re: nginx + fcgiwrap, web interface problemshttp://domain.com/mailman/list-name/admin
I got rid of the cgi-bin part of the URL, and modified mm_cfg.py to reflect that change. The Mailman-generated links on the page also reflect that. And yes, the Mailman CGI's are (symlinked) in /usr/lib/cgi-bin/mailman/. Is there anything abnormal about them other than the location of the CGIs on my system? On Wed, Sep 15, 2010 at 12:35 PM, Mark Sapiro <mark@...> wrote: > Jon Evans wrote: > > > >When I go to an 'admin' URL, I get the admin overview like you say. It > > > >I just tested the regex, and it seems to appropriately split the path > into, > >for example, > >PATH_INFO = /list-name/admin > >PATH_TRANSLATED = /usr/lib/cgi-bin/mailman/admin/list-name/admin > >SCRIPT_FILENAME = /usr/lib/cgi-bin/mailman/admin > > > > What was the actual URL in this case? The above seems strange. If the > URL is http://host/mailman/admin/list-name/admin, then PATH_INFO seems > right, but that's an unusual URL. Also, PATH_TRANSLATED and > SCRIPT_FILENAME are unusual, but if your Mailman CGI wrappers are > actually in /usr/lib/cgi-bin/mailman/, then that seems OK. > > -- > Mark Sapiro <mark@...> The highway is for gamblers, > San Francisco Bay Area, California better use your sense - B. Dylan > > Mailman-Users mailing list Mailman-Users@... http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/lists%40nabble.com |
|
|
Re: nginx + fcgiwrap, web interface problemsJon Evans wrote:
> >http://domain.com/mailman/list-name/admin The standard URL is http://domain.com/mailman/admin/list-name and PATH_INFO should be just /list-name in this case If you are doing some mapping/rewriting so that the list name can precede the CGI name in your URLs, that may be where the problem lies >I got rid of the cgi-bin part of the URL, and modified mm_cfg.py to reflect >that change. The cgi-bin part is non-standard in GNU Mailman, Are you using someones package? >The Mailman-generated links on the page also reflect that. > And yes, the Mailman CGI's are (symlinked) in /usr/lib/cgi-bin/mailman/. > >Is there anything abnormal about them other than the location of the CGIs on >my system? The major abnormality is your URL. Are you sure your URL's are like the one above? If so, What have you done to make the URLs in links on Mailman's web pages take that form? What happens if you put the following in /usr/lib/cgi-bin/mailman/printenv and go to <http://domain.com/mailman/printenv/aa/bb/cc>? ------------------------------------------------------------- #!/usr/bin/python import os print 'Content-type: text/html' print '<HTML><HEAD><TITLE>Print Environment</TITLE></HEAD><BODY>' for n,v in os.environ.items(): print '%s: %s<br>' % (n,v) print ' </BODY> </HTML>' -------------------------------------------------------------- -- Mark Sapiro <mark@...> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan ------------------------------------------------------ Mailman-Users mailing list Mailman-Users@... http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/lists%40nabble.com |
|
|
Re: nginx + fcgiwrap, web interface problemsI mistyped that last time, doh. It is
http://domain.com/mailman/admin/list-name. I got the CentOS 5 package (Mailman 2.1.11) which defaults to an Apache config of /cgi-bin/mailman/ and I changed it to just be /mailman/ (in terms of the URL, not the folder structure). Your script output: http://pastebin.com/waqQC8Lr <http://pastebin.com/waqQC8Lr>Looks like: PATH_TRANSLATED: /usr/lib/cgi-bin/aa/bb/cc is wrong, shouldn't it be something like /usr/lib/cgi-bin/mailman/admin/aa/bb/cc? On Wed, Sep 15, 2010 at 12:54 PM, Mark Sapiro <mark@...> wrote: > #!/usr/bin/python > > import os > > print 'Content-type: text/html' > print '<HTML><HEAD><TITLE>Print Environment</TITLE></HEAD><BODY>' > for n,v in os.environ.items(): > print '%s: %s<br>' % (n,v) > print ' </BODY> </HTML>' > Mailman-Users mailing list Mailman-Users@... http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/lists%40nabble.com |
|
|
Re: nginx + fcgiwrap, web interface problemsJon Evans wrote:
> >I mistyped that last time, doh. It is >http://domain.com/mailman/admin/list-name. I got the CentOS 5 package >(Mailman 2.1.11) which defaults to an Apache config of /cgi-bin/mailman/ and >I changed it to just be /mailman/ (in terms of the URL, not the folder >structure). OK. That's all fine. >Your script output: >http://pastebin.com/waqQC8Lr > >Looks like: >PATH_TRANSLATED: /usr/lib/cgi-bin/aa/bb/cc >is wrong, shouldn't it be something like >/usr/lib/cgi-bin/mailman/admin/aa/bb/cc? No, I think that's correct, but it doesn't matter to Mailman. The script itself got executed, so the server must be going to the right place to find it. The issue I see is that there is no PATH_INFO in the environment at all. This is strange. Your config has in part root /usr/lib/cgi-bin; fastcgi_split_path_info (^/mailman/[^/]*)(.*)$; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; so $document_root is /usr/lib/cgi-bin and $fastcgi_path_info is if I understand correctly, whatever matches the second group in fastcgi_split_path_info which in the case of a GET for /mailman/printenv/aa/bb/cc is /aa/bb/cc. This is reflected in PATH_TRANSLATED: /usr/lib/cgi-bin/aa/bb/cc, and should result in PATH_INFO: /aa/bb/cc However, for some reason, there is no PATH_INFO at all in the enviroment passed to printenv. This lack explains your issue. I can't explain why it is missing given your config, but it needs to be there for the Mailman web interface to work. -- Mark Sapiro <mark@...> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan ------------------------------------------------------ Mailman-Users mailing list Mailman-Users@... http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/lists%40nabble.com |
| Free embeddable forum powered by Nabble | Forum Help |