Skip to content

Instantly share code, notes, and snippets.

View techoutlooks's full-sized avatar

TechOutlooks Sarl techoutlooks

View GitHub Profile

deploying web.py with nginx, uwsgi service and linux

It is possible to deploy web.py with nginx using a uWSGI 2.0.11 or later. Note that earlier versions available in the repository (such as 1.9.17) may not work! uWSGI is available via python's pip installer. Nginx natively supports uWSGI since 0.8.40. The following is for python 2.7.

sudo apt-get install python-pip nginx python-webpy python-dev libpcre3-dev zlib1g-dev libssl-dev libjansson-dev
sudo apt-get remove uwsgi uwsgi-core
sudo pip install uwsgi

Create the folders and set ownership:

@timmyomahony
timmyomahony / nginx.conf
Created June 26, 2011 13:29
Python, UWSGI, Supervisor & Nginx
upstream uwsgi {
ip_hash;
server 127.0.0.1:40000;
}
server {
listen 80;
server_name www.domain.com;
root /sites/mysite/;
access_log /sites/mysite/log/nginx/access.log;