I finally got it working but it was a mess.

These steps wil get it done. Linode is really the best resource for setting 
up on Ubuntu. There is a lot of out-dated, confusing or mis-information out 
there. Start with the Ubuntu docs and Linode Library.

http://library.linode.com/web-servers/nginx/python-uwsgi/ubuntu-10.04-lucid

The one thing you have to do is NOT set up and use the "uwsgi" user. 
Instead, make sure the user is "www-data". So wherever you see "chown 
uwsgi", use "chown www-data" instead. And, in the uwsgi init.d file that you 
grab from Linode, edit the "user" to "www-data".

For the wsgi file, put this in. I'm pretty sure this file is necessary 
although it seemed like there were different ways to config this.

PYTHONPATH=/var/web2py  #your path to web2pyMODULE=wsgihandler

This is the nginx.conf I used. No ssl yet. I will submit my fabfile when I 
confirm it. ANd I'd like to get SSL working.

user www-data;
worker_processes  4;

events {
    worker_connections  1024;
}

http {
    include       mime.types;
    default_type  application/octet-stream;
    keepalive_timeout  2;
    sendfile        on;
    #tcp_nopush     on;
    tcp_nodelay     on;
    gzip  on;
    server {
        listen       80;
        server_name  "";

        location / {
            uwsgi_pass 127.0.0.1:9001;
            include uwsgi_params;
        }
        
        location /static {
            root /var/web2py/applications/init/;
        }
    }   

}

Reply via email to