Skip to content

Instantly share code, notes, and snippets.

@felipe-prenholato
Created November 3, 2011 13:47
Show Gist options
  • Save felipe-prenholato/1336523 to your computer and use it in GitHub Desktop.
Save felipe-prenholato/1336523 to your computer and use it in GitHub Desktop.
server {
listen 80;
server_name sistemas.pdg.com.br;
root /home/sistemas/virtualenvs/prd/portal;
location /media/ {
root /home/sistemas/virtualenvs/prd/portal;
expires max;
}
location / {
include uwsgi_params;
uwsgi_pass unix:///home/sistemas/virtualenvs/prd/tmp/uwsgi.sock;
}
}
[uwsgi]
; uwsgi configuration options: http://projects.unbit.it/uwsgi/wiki/Doc
; venv dir, socket, pid, uid, etc
env=DJANGO_SETTINGS_MODULE=portal.settings
virtualenv=/home/sistemas/virtualenvs/prd/
module=portal.deploy.uwsgi.wsgi_prd
socket=/home/sistemas/virtualenvs/prd/tmp/uwsgi.sock
pidfile=/home/sistemas/virtualenvs/prd/tmp/uwsgi.pid
touch-reload=/home/sistemas/virtualenvs/prd/tmp/restart.txt
uid=sistemas
gid=sistemas
vacuum=true
; process is number of workers, one worker per core.
; cpu-affinity make sure that 1 worker don't change between various cores.
;
; listen isn't port that will listen for connections!
processes=4
cpu-affinity=1
listen=1024
master=true
; Every request that take longer than 60 seconds will die!
harakiri=60
harakiri-verbose=true
buffer-size=25000
; logging stuff
daemonize=/home/sistemas/virtualenvs/prd/logs/uwsgi.log
; when true, disable-logging will disable request logging, only errors will be logged.
disable-logging=false
logdate=true
log-zero=true
log-5xx=true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment