Skip to content

Instantly share code, notes, and snippets.

@jbradach
Created August 3, 2014 21:05
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 jbradach/43d5c7a58dce81fd9acc to your computer and use it in GitHub Desktop.
Save jbradach/43d5c7a58dce81fd9acc to your computer and use it in GitHub Desktop.
Nginx server block for deploying a Flask app using uWSGI.
server {
listen 80;
server_name $hostname;
root /srv/www/$hostname/myapp;
location = /favicon.ico {
alias /srv/www/$hostname/public_html/favicon.ico;
access_log off;
log_not_found off;
}
location / { try_files $uri @myapp; }
location @myapp {
include uwsgi_params;
uwsgi_pass unix:/tmp/myapp.sock;
}
include h5bp/basic.conf;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment