I am currently serving my static files in Django. How do I use Apache2 to do this?

Posted by alex on Stack Overflow See other posts from Stack Overflow or by alex
Published on 2010-03-23T04:01:17Z Indexed on 2010/03/23 4:11 UTC
Read the original article Hit count: 266

Filed under:
|
|
|
|
(r'^media/(?P<path>.*)$', 'django.views.static.serve',{'document_root': settings.MEDIA_ROOT}),

As you can see, I have a directory called "media" under my Django project.

I would like to delete this line in my urls.py and instead us Apache to serve my static files. What do I do to my Apache configs (which files do I change) in order to do this?

By the way, I installed Apache2 like normal:

sudo aptitude install apache2

© Stack Overflow or respective owner

Related posts about django

Related posts about python