soooo close: nginx gunicorn flask directory stripped from links

Brian Scott biscotty666 at
Fri Sep 16 08:03:21 UTC 2022

Wow that looks promising. Can't try until tomorrow because it's 2am but I'll try first thing tomorrow. From a best practices point of view would one solution be better than the other assuming both work? The second suggestion seems more straight-forward and avoids patches/fixes which is a good thing in general.

⁣Get BlueMail for Android ​

On Sep 16, 2022, 1:49 AM, at 1:49 AM, Francis Daly <francis at> wrote:
>On Fri, Sep 16, 2022 at 01:22:46AM -0600, Brian Carey wrote:
>Hi there,
>> I'm very close to getting my flask app properly reverse-proxied by
>If your nginx config is correct, then it might be that the upstream
>/ backend service (the flask app, in this case) does not like being
>reverse-proxied (to a different "sub-directory"),
>> I can access and use my app successfully at
>> I can get to my main page at http://my.domain/app. If I specifically
>> the url of a sub-directory/page I can get there, for example
>> http://my.domain/app works and http://my.domain/app/home works.
>> Hovering over the link it points to http://my.domain/home instead of
>> http://my.domain/app/home.
>Does apply in your
>That page links to a 404 page, where the original content appears to be
>You can possibly / potentially avoid all of that, if you are happy
>to deploy your app at instead of at
> -- in that case, all of the "local" links will
>be the same in both the direct and reverse-proxied cases, so only the
>hostname/port would need adjusting. (Which is usually more
>(I'm presuming that it is possible to deploy a flask app somewhere
>than the root of the web service.)
>Good luck with it,
>	f
>Francis Daly        francis at
>nginx mailing list -- nginx at
>To unsubscribe send an email to nginx-leave at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list