Multiple servers
If your Magento store is hosted on a different server than your Varnish server, you can point the DNS records of the other website to the IP address of your Magento server.
For the store that uses Varnish, you can point the DNS records to Varnish's IP address
Bypassing Varnish on a single server
If you're using a single server for Varnish and Magento, you can bypass Varnish all together if your webserver configuration allows it.
If you have a separate proxy server in front of Varnish for TLS termination and potentially handling port 80 as well, you can have the proxy either directly to Varnish or to the Magento store.
Bypassing the cache on a single server
If Varnish and Magento are hosted on the same server and Varnish listens on port 80, you can't really bypass Varnish.
In that case, specific traffic that is handled by Varnish can bypass the cache if the Host
header matches a specific value.
Here's some example VCL that illustrates this:
sub vcl_recv {
if(req.http.Host ~ "^(www\.)?otherwebsite.com$") {
return(pass);
}
}
This snippet will bypass the cache for all requests where the hostname is otherwebsite.com
and www.otherwebsite.com