title: Why does nginx always send content encoding as gzip
body: <p>I have set gzip to off </p>
  
  <pre><code>user  nginx;
  worker_processes  1;
  
  error_log  /var/log/nginx/error.log warn;
  pid        /var/run/nginx.pid;
  
  
  events {
      worker_connections  1024;
  }
  
  
  http {
      include       /etc/nginx/mime.types;
      default_type  application/octet-stream;
  
      log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                        '$status $body_bytes_sent "$http_referer" '
                        '"$http_user_agent" "$http_x_forwarded_for"';
  
      access_log  /var/log/nginx/access.log  main;
  
      sendfile        on;
      #tcp_nopush     on;
  
      keepalive_timeout  65;
      gzip off;
  
  
      include /etc/nginx/conf.d/*.conf;
  }
  </code></pre>
  
  <p>server config</p>
  
  <p>server {
      listen       80 default_server;</p>
  
  <pre><code>root         /home/www;
  
  access_log  /var/log/nginx/access.log;
  error_log   /var/log/nginx/error.log;
  
  proxy_buffering off;
  
  location /frontend {
  location ~* \.php$ {
      try_files /dev/null @directphp;
  }
  }
  
  location / {
      include fastcgi_params;
      fastcgi_pass x.x.x.x:9000;
      fastcgi_param SCRIPT_FILENAME $document_root/index.php;
  }
  
  location @directphp {
      include fastcgi_params;
      fastcgi_pass  x.x.x.x:9000;
      fastcgi_param  SCRIPT_FILENAME  $document_root/$fastcgi_script_name;
  }
  </code></pre>
  
  <p>}</p>
  
  <p>Check it is not set anywhere else</p>
  
  <pre><code>cd /etc/nginx/
   grep -R gzip .
  
  ./nginx.conf:    gzip off;
  
  
  service nginx restart
  </code></pre>
  
  <p>yet content is still getiing sent as gzip?</p>
  
  <p>Response Headers</p>
  
  <pre><code>Connection:keep-alive
  Content-Encoding:gzip
  Content-Length:51
  Content-Type:application/json; charset=utf-8
  Date:Wed, 05 Oct 2016 10:00:00 GMT
  Server:nginx/1.6.2
  Vary:Accept-Encoding
  </code></pre>
  
  <p>Any ideas to turn gzip off completely</p>