I have a dedicated server centos 6 Apache I have different Magento 2 sites on the server with there own ip and domain. I have installed and configured Varnish for one site / ip running Magento 2 site and used the Varnish configuration file generated in the admin and uploaded to [Home]/etc/varnish and renamed the file as default.vcl below is the settings section.
My problem is if I try to add any more sites/ip the varnish will not restart shows failed. please can someone tell me exactly how to add more sites to the configuration file and I can fill in my ip accordingly.
Secondly I want to ask when I have different Magento 2 sites and 1 varnish when I clear cache in any site will it also clear / purge for all sites - or will they work independently
backend default {
.host = "88.151.196.121";
.port = "8080";
.first_byte_timeout = 600s;
.probe = {
.url = "/pub/health_check.php";
.timeout = 2s;
.interval = 5s;
.window = 10;
.threshold = 5;
}
}
acl purge {
"localhost";
}
sub vcl_recv {
if (req.method == "PURGE") {
if (client.ip !~ purge) {
return (synth(405, "Method not allowed"));
}
88.151.196.121
? If so, no changes are required, because Varnish will use theHost
header and the URL to identify objects in cache. The same applies to clearing the cache.