Setting up CDN in a linux server Setting up CDN in a linux server nginx nginx

Setting up CDN in a linux server


I'd suggest something like:

  • nginx server (very fast for static assets and has a very low memory usage)
  • varnish for cache (HTTP accelerator)

Your most requested static assets like css, js or images will be cached and served as fast as a lightning. I'd recommend having at least 1GB or 2GB of ram for better results.

Here are some helpful links:

How to install nginx: https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-12-04-lts-precise-pangolin

Install varnish: https://www.digitalocean.com/community/tutorials/how-to-configure-a-clustered-web-server-with-varnish-and-nginx-on-ubuntu-13-10

I guess this will serve your purpose.