[Flask] flask url_for / nginx proxy_pass

Pascal patatetom at gmail.com
Fri Jun 10 05:52:57 EDT 2016


my flask app (flaskbb <https://github.com/sh4nks/flaskbb>) is listening on and is ok when accessed directly with

when accessed through nginx with http://mywebserver/flaskbb/, all links are
broken because /flaskbb is missing in the url (eg. src="/css/..." and not

I currently bypasses the problem by modifying the templates, but it's not
clean :-(

how can I solve this problem ?

note that nginx directive is location /flaskbb/ { proxy_pass; } and I can't play with virtual-server/dns.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/flask/attachments/20160610/4b07a01c/attachment.html>

More information about the Flask mailing list