I got varnish installed on my server and made following changes for varnish cache to work.

Changes in httpd.conf :

  • Listen changed from 80 => 8080
  • NameVirtualHost from *80 => *8080

The content of httpd.conf

<VirtualHost *:8080>
       DocumentRoot /var/www/html/XYZ/
       ServerName  demo.example.com

IN /etc/sysconfig/varnish have made this change : VARNISH_LISTEN_PORT=80

IN /etc/varnish/default.vcl: following change is done

backend default {
    .host = "";
    .port = "8080";

For demo.example.com the varnish works fine.

But I also have example.com, example.net and example.org hosted on same server, which I would like to access without varnish involvement. As I changed the PORT from 80 => 8080 in httpd.conf, these sites won't work. Any way out what can be done?


A quick Google search for 'bypass varnish for a domain' turns up this post.

Sounds like exactly what you're looking for.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.