Skip to content

Instantly share code, notes, and snippets.

@wearpants
Created May 27, 2013 20:00
Show Gist options
  • Save wearpants/5658820 to your computer and use it in GitHub Desktop.
Save wearpants/5658820 to your computer and use it in GitHub Desktop.
uwsgi_cache_path /var/www/catapp/CACHE keys_zone=CACHE:10m;
server {
listen 80;
server_name yourdomain.cat;
location /static {
alias /var/www/catapp/STATIC;
}
location /livedata {
include uwsgi_params;
uwsgi_pass unix:/run/uwsgi/app/catapp/socket;
uwsgi_cache CACHE;
uwsgi_cache_key $host$request_uri;
uwsgi_cache_valid 200 2s;
uwsgi_cache_use_stale updating;
}
location / {
include uwsgi_params;
uwsgi_pass unix:/run/uwsgi/app/catapp/socket;
}
}
[uwsgi]
plugins = python27
virtualenv = /var/www/catapp/venv/catapp
module = catapp.main:app
master = True
vacuum = True
processes = 5
max-requests = 5000
harakiri = 20
uid = www-data
gid = www-data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment