I have a Django application running on Gunicorn. I am trying to configure Nginx to serve static files. I have two upstream servers, they come from two different directories, and two different Gunicorn instances. Usually, it is the same code in both folders, but when I need to update the code, I will take one of the Gunicorn instance offline, so that Nginx stops routing traffic to that instance, update the code, and turn Gunicorn back on.
There are two static directories (on from the primary Gunicorn instance, one from the secondary). When I do an update on, let's say the primary, traffic is no longer routed to the primary, and I don't want Nginx to serve static files from the primary static directory.
How can I configure Nginx to do that? Basically, I want two static roots, one linked to each upstream server.