Search code examples
nginxcdndigital-oceanserver-administrationcontent-delivery-network

Setting up CDN in a linux server


I'm trying to set up a CDN for my website. I've hosted it in my virtual server on Digital Ocean but I can't find an howto for configuring all the necessary. Have anyone some suggestions?


Solution

  • 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.