Skeleton for demo of Varnish caching and DNS using Vagrant.
This project sets up the following VMs on a private network in VirtualBox:
- web1 (192.168.2.11)
- web2 (192.168.2.12)
- varnish1 (192.168.2.13)
- varnish2 (192.168.2.14)
- bind9 (192.168.2.15)
- firefox (192.168.2.16)
- Install Vagrant
- Install Virtualbox
- Either clone this repo, or download the zip file and extract it to an empty directory.
- From the root directory, run
vagrant up
Bind9 DNS server is unconfigured. You must configure it properly to serve de IP addresses of varnish and web servers
First, you have to investigate when varnish servers are caching or not caching some of the web servers content depending on the existing .htaccess configuration of the stored website.
Second, you have to modify varnish servers to attend both servers.
Third, you have to modify previous DNS configuration to performa load balancing between the varnish servers.
vagrant halt
turns off vmsvagrant destroy
destroys all traces of the VMs, but leaves the cached imagesvagrant box remove ...
removes the downloaded image file.