title: nginx gzip compression doesn't seem to work
body: <p>I'm trying to figure out why my custom CDN on nginx, doesn't appear to be working. Here is what I have in my site configuration:</p>
  
  <pre><code>server {
  
      listen   80;
      listen [::]:80;
  
      server_name cdn.site.co.uk;
  
      root /srv/www/site.co.uk/bob_user;
  
      if ($uri !~ "\.(gif|jpe?g|png|js|css|eot|woff|ttf|svg)$") {
          rewrite ^/(.*)$ https://site.co.uk/ permanent;
      }
  
      gzip on;
      gzip_disable "msie6";
  
      gzip_vary on;
      gzip_proxied any;
      gzip_comp_level 6;
      gzip_buffers 16 8k;
      gzip_http_version 1.1;
      gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
  
  }
  </code></pre>
  
  <p>The file itself works - but using this tool, it tells me that it does: </p>
  
  <p><a href="https://varvy.com/tools/gzip/" rel="nofollow noreferrer">https://varvy.com/tools/gzip/</a></p>
  
  <p><a href="https://i.stack.imgur.com/OvGyJ.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OvGyJ.jpg" alt="enter image description here"></a></p>
  
  <p>This is the URL I tested:</p>
  
  <p><a href="http://cdn.businessofbrands.co.uk/wp-includes/js/jquery/jquery.js" rel="nofollow noreferrer">http://cdn.businessofbrands.co.uk/wp-includes/js/jquery/jquery.js</a></p>
  
  <p>I'm a bit confused as to why this is. Could anyone shed some light?</p>