I have an IIS 6.0 web server exposed to the internet which isn't performing Gzipping reliably. I know it's old, but it's all i have to work with for this one instance.
What i want to do is put Nginx (or similar) infront of IIS as a reverse proxy and caching server to speed the website up. However i'm not sure if it's possible to have the nginx server gzip from itself to the web browser. If IIS passes Gzipped requests back to nginx, they get back to the browser just fine.
gzip on;
gzip_min_length 1000;
gzip_buffers 4 8k;
gzip_http_version 1.0;
gzip_disable "msie6";
gzip_types text/plain text/css;
gzip_vary on;
location / {
proxy_set_header x-real-IP $remote_addr;
proxy_set_header x-forwarded-for $proxy_add_x_forwarded_for;
proxy_set_header host $host;
proxy_pass http://192.168.5.37;
}
HTTP Request (/css/components.css)
GET /css/components.css HTTP/1.1
Host: www.mydomain.co.uk
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache
Accept: text/css,*/*;q=0.1
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.71 Safari/537.36
Accept-Encoding: gzip, deflate, sdch
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6
HTTP Response (/css/components.css)
HTTP/1.1 200 OK
Server: nginx/1.8.0
Date: Thu, 22 Oct 2015 14:26:08 GMT
Content-Type: text/css
Transfer-Encoding: chunked
Connection: keep-alive
Vary: Accept-Encoding
Last-Modified: Sat, 22 Aug 2015 09:36:54 GMT
ETag: W/"07f8614bedcd01:8beb"
X-Powered-By: ASP.NET
Is there a magic parameter i'm missing somewhere to tell it to compress the files in nginx?
Thanks!
Dean