Hi! Not sure if it's your case. I had a similar problem, asked around and Bruce Wade told me that there were a few changes on uwsgi on ubuntu, so he changed the installation script a bit and posted it on the list.
The link is: https://groups.google.com/forum/#!searchin/web2py/nginx$20update/web2py/ysmeR0mZVZo/nOBTKhPOgi8J Worked for me. Hope it works for you too. Cheers, Marco Tulio 2012/5/16 Lewis <[email protected]> > Guys, I have followed the cookbook, the posts here, and a posting at > stackoverflow. > > I am getting error 502 bad gateway. My stuff looks like everyone else's > but there are deeper layers of indirection in uwsgi itself and nginx. I > have several uwsgi sym links in /etc/init.d It is not clear which is the > "real" one and how to invoke it. > > Here is the error from the nginx log. I guess I interpret this to mean > that nginx can't find uwsgi: > > 2012/05/16 22:53:29 [error] 2460#0: *1 connect() failed (111: Connection > refused) while connecting to upstream, client: 76.104.195.84, server: > www.lewcl.com, request: "GET / HTTP/1.1", upstream: "uwsgi:// > 127.0.0.1:9001", host: "www.lewcl.com" > > I have no clue what to do. > > Guys, I think that python and web2py have a profoundly serious problem > with config. Documentation is often wrong--a single punctuation mark, > directory or option being off means it won't work. If we have that in our > Python code it won't run, but we have great traceback and debugging tools > to tell us exactly where the error is and often what the error is. But when > one of 5 or 6 text files scattered across the file system is wrong, all we > find out is that it won't run. There are no diagnostics (or very course > ones like "error"). I'd like to work with some people in the community to > redo a lot of the guides and get them to be accurate. > > I don't think script files are much of a solution (except as a way to > document something that once worked on some arbitrary system). Running an > arbitrary script file blindly can do serious harm to your environment. > Script files are not fully debugged and recoverable setup programs. > "Setup" is one of the hardest things to do right. It is not a throw-away > task to be done at the end of the project. > -- []'s Marco Tulio

