Relative Content

Tag Archive for djangonginxnginx-reverse-proxynginx-configdjango-staticfiles

how should index.html be served with django gunicorn and nginx?

my webapplication entirely dockerized and is written with a django and gunicorn backend and an nginx frontend. nginx is needed as a proxy and to serve static files.
nginx has access to the static files via mounted volume from django. I would like the entire frontend not as django templates.
i’m not understanding if index.html can be directly managed by nginx like this first configuration. (first nginx.conf)
or if the request should regardless firstly reach django and then, ascertained that the wanted file is a static file (index.html), be redirected with the url changed in /static/… so that can be caught by nginx. (second nginx.conf).