I have a flaskapp, deployed using nginx as proxy server and gunicorn. I have several routes defined in the Flask python script, except they aren't accessible.
When using development server, however, they work just fine.
All routes except the base url ("/") return 404 nginx page, so I'm assuming there's something with nginx, but I found nothing that could help me with it.
How to configure nginx to accept these routes and use the one defined in flaskApp?
That's because you did not define all the routes in your nginx configuration, you should have something like the example below, except that you should change
server_name
andports
.Note : I was using this snippet to connect nginx to other containers so think about changing http://client:80; to your localhost or application name, also do the same for all the routes.
The main idea is to define all routes.