on my server if people are using the /media path they can see a list of the whole folder with every file. How can I block that the people are seeing that, like with a 404 page. But I cant disable it in general because I refer to that path with images and stuff on other pages. So in conclusion I need to disable /media path for users but not for the server itself.
This is most likely something being done by the web server and not by Django. How is your project deployed? Are you using Apache, nginx, or something else? How is your server configured to serve that directory?
so I was looking around in StackOverflow and here is an answer which I found very useful StackOverflow Entry
the only thing i didn’t understand is where he defined the “ProtectedDocument” as parameter when defining document like what is this from where do I get that. I cant comment there because I dont have enough reputation on StackOverflow but maybe you can explain it. I understand now that I can serve files via the URI in the nginx addon like here X-Accel | NGINX and in Django I just have to pass the file via the uri to nginx. But whats with this “ProtectedDocument”