Skip to content

Instantly share code, notes, and snippets.

@jameskyle
Created December 8, 2012 20:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jameskyle/4241750 to your computer and use it in GitHub Desktop.
Save jameskyle/4241750 to your computer and use it in GitHub Desktop.

uwsgi

uwsgi --plugins http,python -s /tmp/mysock.sock -w gitpost:app \
      -H /var/www/blog.jameskyle.org/env/ --chmod-socket 777  \
      --buffer-size 32768 --catch-exceptions

nginx

location /api {
  rewrite /api/(.*) /$1 break;
  proxy_redirect off;
  proxy_set_header Host $host;
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  proxy_pass        http://unix:/tmp/mysock.sock; # this does not work
  #proxy_pass http://localhost:5000; # this works

}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment