[Answered ]-Django static files do not display in production server. How can I map them correctly, so I can see the admin GUI

1👍

did you set the STATIC_ROOT in your projects settings , then make collect static and add the folder name in apache conf.

eg :

STATIC_URL = '/static/'
STATIC_ROOT = root("statticstorage")

then if run python manage.py collect static the command will create a folder called static storage and all the styles (including admin css and etc) will copied from static folder , then make the root in to static storage in apache conf

1👍

I realized that I was mapping the static files incorrectly in apache.conf

The correct map to the files would be:
Alias /static /var/www/html/myproject/static

Note: Need to make sure that /static doesn’t have a trailing slash in the above command

Leave a comment