From the Django on mod_wsgi page:
We recommend using a separate Web server – i.e., one that’s not also running Django – for serving media.
Why?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In general, it’s a good idea to put static content – e.g. images, CSS and JS files – on a different server and, furthermore, on a different domain/subdomain. This allows the software that serves the static files to be highly optimized and blazingly fast (for example, nginx).
The other main benefit comes from decreases in network traffic. If you serve static content from the same domain as your dynamic Django app, then client browsers send your domain’s cookies as part of their HTTP request, even for static files. This is unnecessary overhead – static files will always be static – but is required because the client can’t tell the difference between static and dynamic content. If, on the other hand, the static content was being served from a different domain, then it could be configured as a “cookieless domain“, thus minimizing request overhead.