I have just finished setting up Varnish on my test server that uses Webmin/Virtualmin, with Apache on Centos.
It has been a little bit of a voyage of discovery but I think I have cracked it. Much of what I have here is based on many other blogs and forums. In essence once you know how its easy, but there are a few pit holes to watch for in Virtualmin/Webmin, as editing the underlying httpd.conf file isn’t the way to go.
The main steps are
- Get Varnish
- Set up the Varnish control file
- Modify the Apache virtual hosts port number
- Restart the servers
- Tidy up Virtualmin server templates and make sure that Varnish runs on boot / restarted with Apache
and you are done. My experience is on a Centos server, I’m sure that the process is the same on Ubuntu except the details of some of the linux level commands and file locations