I want to use varnish cache for magento 2 and prestashop on one server. I ask my friend but he told me can't do it. Because they have different configure. Can i install vanish cache and use it for only magento or for both?
1 Answer
You can install Varnish on one server to use for both Magento2 and Prestashop.
However I suspect that both Magento2 and Prestashop will have some special config needed in Varnish. Therefore the VCL will be a bit more complex.
Assuming that Magento2 and Prestashop are used on different hosts, you can add logic in your VCL based on the domain name if the configs are conflicting
if(bereq.http.host == "magento-host.com") {
// specific config for magento
}
if(bereq.http.host == "prestashop-host.com") {
// specific config for prestashop
}