On a brand new debian/*ubuntu distro, there are only a couple steps to do in order to make Varnish act as a proxy do its job in front of apache.
Installation:
1
| |
then you need to configure it to listen to the :80 port, editing /etc/default/varnish:
1 2 3 4 5 | |
and telling it to forward requests to apache ( we’re gonna make it listen to the 8090 ), into the /etc/varnish/default.vcl:
1 2 3 4 5 6 7 8 9 | |
Then it’s time to tell apache it has to listen to a new port, in /etc/apache2/ports.conf:
1 2 | |
Make sure the hosts in your /etc/apache2/httpd.conf listen to :* or :8090, then you can start the services:
1 2 | |
Now you have varnish responding to all the hosts on the :80: if you experience some troubles try to go deeper with this extended guide.