Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 17th, 2012  |  syntax: None  |  size: 0.68 KB  |  hits: 14  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. configuring nginx and uwsgi for python flask application
  2. [uwsgi]
  3. socket=/tmp/uwsgi_mysite.sock
  4. chmod-socket=666
  5. abstract-socket=false
  6.  
  7. master=true
  8. workers=2
  9.  
  10. uid=altera
  11. gid=altera
  12.  
  13. chdir=/home/altera/www/mysite   ; Current dir
  14. pp=/home/altera/www/mysite      ; Python Path (to your application)
  15. pyhome=/home/altera/vpy/mysite  ; Path to virtual environment
  16. plugins=python3  
  17. module=main                     ; *.py file name application starting from
  18.  
  19. post-buffering=8192
  20.        
  21. server {
  22.         server_name     mysite;
  23.  
  24.         root /home/altera/www/mysite;
  25.  
  26.         location / {
  27.                 include        uwsgi_params;
  28.                 uwsgi_pass     unix:/tmp/uwsgi_mysite.sock;
  29.         }
  30. }