There are a few threads on Varnish e.g. http://www.virtualmin.com/node/20448 but they mainly relate to how to set up Varnish rather than the particular and hopefully last issue I have with Varnish & Webmin/Virtualmin.
Once I get it sorted I'm happy to write up the basic steps, but at the moment I have a stumbling block with what I am assuming is related to defaults on Webmin, but I can't find a solution, hence posting here to see if someone can give me some pointers.
I have successfully set up Varnish listening on port :80 and then manually edited through httpd.conf to listen on *:8080 and changed all the virtual hosts to listen on myip:8080 - All works well.
In the Webmin>Apache Webserver>Networking and Addresses> I have - listen on ports . all 8080 & 443
I set up my Virtualmin>System Settings>Server Templates>Apache Website to listen on 8080 / 443
All works well if I create a new virtual host. (set up on port 8080)
Then I try and do something in Virtualmin on a previously installed Virtual Host (was on 80 now on 8080 edited via https.conf), like edit the webserver or do a backup and get a message that there ' no Apache virtual host found!'. No exactly true as there is an Apache Virtual Host in httpd.conf - something else is cross referencing the the fact it was originally on port 80 - maybe the original 'Server Template' at creation?
So I have tried removing and adding back a virtual server and it gets set up on port myip:80 and in Webmin>Apache Webserver>Networking and Addresses> I get a new entry ports 8080 & 433 and a new port 80
Obviously that now breaks everything (can't have httpd & varnish both listening on 80.
Now, in my mind, I'm thinking that the original Server Template is still in play when I remove and add back the apache server through Virtualmin - so maybe there is a way to 'refresh'. But I have tried edit virtual server / change server template / change plan / enable disable apache & associated features / disable - enable the whole virtual server and every combination I can, and yet I can get an existing virtual server to pick up the new 8080.
There must be some config file / database that is remembering this?
Otherwise I guess I'm going to have to try backing up / re-installing aas an approach - but even them I'm worried that the backup will 'remember' the port 80.
Starting again and manually re-creating VirtualServers will be a real pain.
Any one with any insight into this?
OK, I have found it!
Instead on manually editing httpd.conf
change the port to 8080 in Virtualmin>server Configuration>Change IP address
(or write a script to change them all at command line level - which is probably what I will do, otherwise lotrs of room for error)
just for anyone stumbling on this
I have written up my experience here http://badlywired.com/technical-stuff/2013/09/27/setting-up-varnish-with...
Hi, I am veery interested on the topic, but link returns a 403 Forbidden