# Redirect everything to the main site.
server {
server_name www.mysite.com;
return 301 http://mysite.com$request_uri;
}
server {
server_name mysite.com;
location / { try_files $uri @flaskapp; }
location @flaskapp {
include uwsgi_params;
uwsgi_pass 127.0.0.1:5000;
}
}