For a website I'm developing all my static content is hosted offsite on a combination of S3/Cloudfront. I've been looking over a lot of tutorials for deploying a Django app into production and a lot of them recommend a combination of Nginx (reverse proxy) + Apache. This is stated under the assumption that Ngnix will be used for serving static contents and Apache will do all the heavy lifting. Are there any other reasons to have a reverse proxy when I don't have any static contents to serve? Or in this case could I simplify my server setup and just use Apache?


Nginx will help in your use case as well. Generally, like any reverse proxy, it helps to utilize server resources more optimally with two major techniques:

  1. As you correctly pointed out, it serves static content, thus freeing a heavy-weight web server from doing this.
  2. But it also solves the problem of "slow clients", i.e. those clients who use slow connections (dial-up or mobile). Since Apache generates a dynamic page pretty fast, Nginx gets it, stores to the temporary file and serves it to the client at the client's speed (much like it would serve a static content), freeing Apache to serve another request.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.