title: How to configure nginx drupal virtual host to use varnish
body: <p>I've configured a drupal website using nginx and the following declaration:</p>
  
  <pre><code>server {
  listen 8080;
  listen 443 ssl http2;
  server_name site.dev;
  root "/home/Code/site";
  </code></pre>
  
  <p>Inside /etc/varnish/default.vcl i have the following config values:</p>
  
  <pre><code>backend default {
      .host = "127.0.0.1";
      .port = "8080";
  }
  </code></pre>
  
  <p>Now the problem i'm having is that accessing the website via site.dev is impossible, i'm forced to use :8080 now, when i thought varnish would take over all requests at port 80? All pages being served are also (not surprisingly) not being served via varnish.</p>
  
  <p>My daemon used to start vanish looks like this: </p>
  
  <pre><code>DAEMON_OPTS="-a 127.0.0.1:80 \
               -T localhost:6082 \
               -f /etc/varnish/default.vcl \
               -S /etc/varnish/secret \
               -s malloc,256m"
  </code></pre>
  
  <p>Any pointers to how i can set this up most welcome. Thanks</p>