Score:0

No static files being served behind Nginx proxy manager

nr flag

I managed to get a Django project fully op and running with Nginx,Gunicorn and Docker. If I run the container it's fully working when I access it via:

I can access the files in /static with the above local 2 address types, and the site looks normal. CSS and images are fine.

But if I then put the container behind a reverse proxy with Nginx proxy manager I suddenly don't get the static files anymore. The site loads but no static content is delivered.

I've checked the logs both on the container which is serving the site and on the container where the proxy manager runs. Nothing that indicates this failure. When I run the site container not in daemon mode it shows in the terminal "File not found static/icon.png" if I try to use the Proxy manager address.

I have other Docker containers fully accessible this way, f.e. portainer, firefly. So the Nginx Proxy manager works.

Why would the local address work but if I point with a reverse proxy to the container it doesn't?

Richard Salts avatar
cn flag
What's the nginx config on the proxy relevant to this site look like?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.