webpy/webpy — Issue #139: Add in "Install guide" describing about nginx with uWSGI
Author: freem4n
Created: 2012-02-11 18:17:22+00:00
State: open

Add to http://webpy.org/install describing about nginx with uWSGI

Nginx config:

server {
# Change this if you want to serve your application on another port
listen 80;

# Replace this with your domain name
server_name apps.example.com;

# You can use virtual directory like '/apps/' here, but remember that
# you should matching 'urls' defined in your web.py application file
location / {
include uwsgi_params;

# This should match the 'socket' entry of your uwsgi.xml
uwsgi_pass 127.0.0.1:9090;

# This is the absolute path to the folder containing your application
uwsgi_param UWSGI_CHDIR /var/www/apps;

# This is actually not necessary for our simple application,
# but you may need this in future
uwsgi_param UWSGI_PYHOME /var/www/apps;

# This is the name of your application file, minus the '.py' extension
uwsgi_param UWSGI_SCRIPT index;
}
}

And add this line to the end of application .py file: application = app.wsgifunc()