I am a little confused regarding what direction to go. I am establishing Django to operate on the Mediatemple DV server. I am trying to puzzle out the right setup for serving image/video/etc content.

I do not quite understand what this signifies on http://docs.djangoproject.com/en/dev/howto/deployment/modwsgi/

We advise utilizing a separate Web server -- i.e., one that is not also running Django -- for serving media. Here are a few good options:

lighttpd, Nginx, Tuxedo, A removed-lower version of Apache, Cherokee

Performs this mean I ought to serve Django on a single Apache instance (via mod_wsgi) after which serve its content on another demonstration of Apache or among the options above? I'm able to do that on a single devoted virtual server, right? If that's the case, any suggestions about the way i must do that?

Thanks!

For almost all people there's no requirement for another media server. There's been growing critique within the Django documentation being to liberal in pushing people for the reason that direction when there's no need.

So, think before initially and when using mod_wsgi make use of the the Apache web server for static media too. It's suggested though that you simply be sure that your run your WSGI application in daemon mode of mod_wsgi as this way the processes serving up static files is going to be slim and never incur overhead from the actual dynamic web application.

If excessively concerned about memory usage, in addition have a read of:

http://blog.dscpl.com.au/2009/11/save-on-memory-with-modwsgi-30.html

Observe how that goes and just when Apache itself looks to not be sufficient, then turn to using another server to deal with media, the most well-liked arrangement being to make use of nginx to deal with static media, with nginx also serving as proxy right through to Apache/mod_wsgi. Using nginx in-front really enables Apache/mod_wsgi to do better, which using nginx on the separate domain won't.

Essentially what it's saying is you should use apache using mod_wsgi for everyone your django application, and employ a far more lightweight web server like nginx for everyone your static content.

For instance.

world wide web.yourapp.com -> apache -> mod_wsgi -> your django application

static.yourapp.com -> nginx

By separating your concerns you are able to configure your apache instance to become your dump truck handing the heavy processing, as well as your nginx server to become light and fast just like a racecar serving plenty of little static files.

Should you configure nginx to ensure that it handles all website traffic, you are able to reverse proxy all django demands to apache behind it, and intercept all the static files and serve individuals strait from nginx.

see these links to learn more.

http://codespatter.com/2009/04/23/how-to-speed-up-your-django-sites/

django : Serving static files through nginx

http://serverfault.com/questions/122809/django-serving-static-files-through-nginx

http://serverfault.com/questions/199038/serving-static-files-fails-nginx

Ken is appropriate in the assessment as well as in suggesting serving everything behind a NGINX proxy. That's what you want.

You could have the application and media servers on a single server or different styles. For many programs, it will not matter which is fine for everyone both media and applications in the same machine.

If you're searching at plenty of customers and high traffic, smashing the media server out into it's own machine may prevent the 2 from crashes one another and permit you a little more versatility.

Take a look at Gunicorn should you haven't already because it is a lightning fast, simple to deploy application server and it is the brand new hotness.