soooo close: nginx gunicorn flask directory stripped from links

Brian Carey biscotty666 at gmail.com
Fri Sep 16 07:22:46 UTC 2022


Hi,

I'm very close to getting my flask app properly reverse-proxied by nginx.

What works:

I can access and use my app successfully at http://127.0.0.1:8000.

I can get to my main page at http://my.domain/app. If I specifically 
enter 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.

What doesn't:

But if I click on the "home" or any other link I get a file not found 
error. Hovering over the link it points to http://my.domain/home instead 
of http://my.domain/app/home. I have tried playing around with the 
@app.routes but I don't seem to be getting anywhere.

What am I missing? (fwiw I'm doing all this locally without a hosting 
service)

Thanks in advance for any ideas



More information about the nginx mailing list