I don't know about running web2py using uwsgi;

However;

When I run web2py with nginx I use the fastcgi module;

I configure nginx like described in the stackoverflow article;

except I use fastcgi;

In nginx config I have

location / {
    include fascgi_params;
    fastcgi_pass unix:/tmp/fcgi.sock

}

then go to web2py root and run the python fastcgihandler.py script;

The caveat is that you have to change the permissions on the /tmp/fcgi.sock file because when web2py runs it; its run under the user that started the process;

so you do

chown nginx:nginx /tmp/fcgi.sock

and then your done;

You wont get and 502 errors or anything; its really quite simple;

I am not sure if the uwsgi implementation is better as I am trying that tonight; but fastcgi has be running very stable for the past few months.

I apologize for the lack of detailed instructions (I am not in front of the configs) but if you have any questions I can look into it further and try to help.

Thanks.



On 3/26/11 6:04 PM, LightOfMooN wrote:
Hi
I follow this guide 
http://stackoverflow.com/questions/5335153/how-to-deply-web2py-using-nginx
I have ubuntu 10.4 + nginx + web2py, installed in var

And the result is 502 Bad Gateway.
Any suggestions?


Reply via email to