-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Django Static files serving #1718
Comments
The way I understand you are trying to do it is not possible. I'm assuming you run the django app with gunicorn in a container? Then npm has no access to the files you are trying to serve. Furthermore static file serving is not supported officially by npm, there only is a feature request for it. You should theoretically be able to have static file serving by mounting the files into the container and using the advanced config, but we can't officially support this, you might want to try the reddit community. |
Thank you very much for replying . I honestly did not understand but I found a work around using whitehorse to serve my statics directly from the python. I tried looking at the credit community for answers but none of them were to detail. finally I would like some assist on redirecting as the HTTP versions of my domain are still accessible and the www does not redirect to non www .... i saw redirect host but documentation and online searches don't quite show |
Create a redirect host for |
Wow thank you that actually worked |
@Maxino22 Hi! any updates on this? I'm facing the same issue. Couldn't find any references to "whitehorse" you mention. Thanks! |
sorry mate its not whitehorse rather white noise... it makes running django quite easy.... http://whitenoise.evans.io/en/stable/ ... it will be easy read the docs i beleive will solve problem |
Thanks @Maxino22 I'll give it a shot! |
I've already solved with Whitenoise, thanks @Maxino22 !!! |
you welcome... Glad i could help 🔥 |
It can cause problems when adding an advanced configuration and enable "cache assets". |
This solved my issue. |
Hello am new to nginx proxy manger and soo far i have understood the workflow however in the location section am having a bit of trouble.. am running a django app with gunicorn which only handles python code hence my static files(javaScript & CSS) are not being served..
i want to include them in the location area but every time I do it the host goes offline... if I used an nginx config file traditionally this is what it would look like
I want the proxy params , media and static to be included in location but I can't find a way... kindly assist
The text was updated successfully, but these errors were encountered: