location /flask-demo/ { root /var/www/passenger-python-flask-demo; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Host $host; rewrite /flask-demo/([^/]+) /$1 break; proxy_pass http://127.0.0.1:3000/; }
And then add additional location blocks/rewrites to handle static content. Posted at Nginx Forum: https://forum.nginx.org/read.php?2,274104,274106#msg-274106 _______________________________________________ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx