I’ve heard I should use Apache for serving static files in a production environment. I’m having some problems understanding how I’m supposed to do that though. My project’s static URL is /static/, and django.contrib.admin‘s static path is /static/admin/. Those are two completely separate directories on my server, and I can hardly do this:
Alias /static /path/to/site.com/static
Alias /static/admin /usr/local/.../django/contrib/admin/media
Since they overlap.
How am I supposed to do this? Do I really have to copy the contrib admin static folder into my own?
Firstly, no-one says you have to serve your admin static files from the same base path as the others. You can set
ADMIN_MEDIA_PREFIXto whatever you like.However, surely the easiest thing is just to add a symlink from your static folder to django/contrib/admin/media.