You need to configure apache correctly and set up your static url in django.

See here for an explanation:
https://docs.djangoproject.com/en/3.0/howto/deployment/wsgi/modwsgi/#serving-files

Regards,

Andréas


Den tis 19 maj 2020 kl 03:38 skrev jtaylor___ <jtay...@lorencook.com>:

> I'm setting up a Django instance running with gunicorn, behind Apache.
> Running on the server, the initial page comes up at http://server_host/dj/,
> but all the static resources give a Status Code "301 Moved Permanently".
> Here's an example URL:
> http://server_host/dj/static/app_name/bootstrap/css/app_name-bootstrap.min.css
> .
>
> In PyCharm with "manage.py runserver", the initial page loads and the same
> static resource (
> http://127.0.0.1/static/app_name/bootstrap/css/app_name-bootstrap.min.css)
> loads fine.
>
> I spent a while on Google, but I guess I don't know how to properly write
> the search to find a solution.
>
> Any suggestions?  TIA
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/46757a62-69d5-46fb-a259-23d92e796783%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/46757a62-69d5-46fb-a259-23d92e796783%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAK4qSCcXUA8-iU9K1vb3G7jEhj%2BDFALn1fXTVXaR4AqHSZk4zQ%40mail.gmail.com.

Reply via email to