Skip to content

Instantly share code, notes, and snippets.

@jbradach
Created August 6, 2014 13:42
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/0981b7171e13ad79c115 to your computer and use it in GitHub Desktop.
Save jbradach/0981b7171e13ad79c115 to your computer and use it in GitHub Desktop.
Nginx IPv6 server block and upstream for uWSGI apps.
upstream uwsgi_host {
server unix:/tmp/flaskapp.sock;
}
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
location ^~ /static/ {
alias /srv/www/flaskapp/app/static;
}
location / { try_files $uri @flaskapp; }
location @flaskapp {
include uwsgi_params;
uwsgi_pass uwsgi_host;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment