# Gzip on 7.65 not responding

**URL:** <https://www.ruby-forum.com/t/gzip-on-7-65-not-responding/189175>\
**Category:** NGINX\
**Created:** [May 26, 2010, 1:32am UTC](https://www.ruby-forum.com/t/gzip-on-7-65-not-responding/189175 "2010-05-26T01:32:40Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![reference123](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/858c86/32.png) [@reference123](https://www.ruby-forum.com/u/reference123)\
**Post date:** [May 26, 2010, 1:32am UTC](https://www.ruby-forum.com/t/gzip-on-7-65-not-responding/189175/1 "2010-05-26T01:32:40Z")

</div>

I am using version 7.65 on Ubuntu 10 as a reverse proxy. The backend  
server is running asp pages on iis6. I have the following in my nginx  
conf file -

gzip on;  
gzip\_disable “MSIE [1-6].”;  
gzip\_buffers 16 8k;  
gzip\_http\_version 1.1;  
gzip\_comp\_level 8;  
gzip\_min\_length 0;  
gzip\_vary on;  
gzip\_proxied any;  
gzip\_types text/plain text/css text/xml text/javascript  
application/xml application/x-javascript;

When this is on I get the content-encoding gzip header and  
transfer-encoding chunked. I do not get a content-length header. When  
I check compression by going to a couple of websites that confirm  
compression they tell me the page is not compressed.

If i turn off the gzip I do not see the gzip and chunked headers but do  
see content-length.

What do I need to change to get gzip compressing the pages? The content  
type of the pages is text/html in almost every case.

Posted at Nginx Forum:

> **[gzip on 7.65 not responding](https://forum.nginx.org/read.php?2,90260,90260#msg-90260)**
>
> I am using version 7.65 on Ubuntu 10 as a reverse proxy. The backend server is running asp pages on iis6. I have the following in my nginx conf file - gzip on; gzip\_disable "MSIE \[1-6\]\\."; gzip\_buffers 16 8k; gzip\_http\_version 1

---

<div class="post-metadata">

**Author:** ![reference123](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/858c86/32.png) [@reference123](https://www.ruby-forum.com/u/reference123)\
**Post date:** [May 26, 2010, 1:35am UTC](https://www.ruby-forum.com/t/gzip-on-7-65-not-responding/189175/2 "2010-05-26T01:35:00Z")

</div>

Also, compression is not enabled on the backend iis6 server. I have  
tried with and without compression on the backend server and it did not  
make any difference.

Posted at Nginx Forum:

> **[Re: gzip on 7.65 not responding](https://forum.nginx.org/read.php?2,90260,90263#msg-90263)**
>
> I am using version 7.65 on Ubuntu 10 as a reverse proxy. The backend server is running asp pages on iis6. I have the following in my nginx conf file - gzip on; gzip\_disable "MSIE \[1-6\]\\."; gzip\_buffers 16 8k; gzip\_http\_version 1

---

<div class="post-metadata">

**Author:** ![reference123](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/858c86/32.png) [@reference123](https://www.ruby-forum.com/u/reference123)\
**Post date:** [May 26, 2010, 2:43pm UTC](https://www.ruby-forum.com/t/gzip-on-7-65-not-responding/189175/3 "2010-05-26T14:43:28Z")

</div>

We have much the same setup (nginx → IIS6) and compression works  
fine. However, you have quite a few items in your gzip config that are  
probably unnecessary, and might be causing issues.

I would first use a tool like Fiddler ([www.fiddler2.com](http://www.fiddler2.com)) rather than a  
3rd party site for testing. You can see if a response is compressed  
using the inspector section on the right side of the fidder window.

Secondly, try commenting out all your gzip-related settings except  
“gzip on” and make sure it works with that.

Third, you likely don’t want “gzip\_comp\_level 8”, as it burns a lot of  
CPU for saving maybe 5-10% size over the default setting (which is  
gzip\_comp\_level 1).

Finally, add back your additional gzip-related settings until you  
start to see uncompressed responses.

–  
RPM

---

<div class="post-metadata">

**Author:** ![reference123](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/858c86/32.png) [@reference123](https://www.ruby-forum.com/u/reference123)\
**Post date:** [May 26, 2010, 3:19pm UTC](https://www.ruby-forum.com/t/gzip-on-7-65-not-responding/189175/4 "2010-05-26T15:19:46Z")

</div>

Hello!

On Tue, May 25, 2010 at 07:31:32PM -0400, reference123 wrote:

> ```
> gzip_vary on;
> gzip_proxied any;
> gzip_types text/plain text/css text/xml text/javascript application/xml application/x-javascript;
> 
> ```
> 
> When this is on I get the content-encoding gzip header and  
> transfer-encoding chunked. I do not get a content-length  
> header. When I check compression by going to a couple of  
> websites that confirm compression they tell me the page is not  
> compressed.

So you see it’s correctly compressed, but some external website  
checkers report it’s not. Most likely it’s caused by using  
HTTP/1.0 checks on these checkers. You may try to set

```
gzip_http_version 1.0;

```

to make these checkers happy. But I would recommend to keep the  
default (gzip\_http\_version 1.1) instead to avoid problems with  
real HTTP/1.0 clients/proxies.

Maxim D.

---

<div class="post-metadata">

**Author:** ![reference123](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/858c86/32.png) [@reference123](https://www.ruby-forum.com/u/reference123)\
**Post date:** [May 26, 2010, 5:17pm UTC](https://www.ruby-forum.com/t/gzip-on-7-65-not-responding/189175/5 "2010-05-26T17:17:27Z")

</div>

On Wed, May 26, 2010 at 5:03 PM, reference123 [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Ryan, we use such high compression because we are running on a machine with  
> a lot of cpu overhead. If the higher compression starts to put some  
> pressure on the CPU we will lower it and I appreciate the reminder about  
> that.

Right, but it will stil affect latency 😉

---

<div class="post-metadata">

**Author:** ![reference123](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/858c86/32.png) [@reference123](https://www.ruby-forum.com/u/reference123)\
**Post date:** [May 26, 2010, 5:05pm UTC](https://www.ruby-forum.com/t/gzip-on-7-65-not-responding/189175/6 "2010-05-26T17:05:09Z")

</div>

Thanks for the help. Got it working this morning. I did as Ryan  
suggested and found it was related to the gzip disable statement. I  
added MSIE [1-6].(?!.\*SV1) the () part to that statement and it works.

Ryan, we use such high compression because we are running on a machine  
with a lot of cpu overhead. If the higher compression starts to put  
some pressure on the CPU we will lower it and I appreciate the reminder  
about that.

Do you do any type of caching with the proxy and if so, have you had any  
issues? We would like to cache our dynamic asp pages but have been  
cautious because of viewstate and sessions.

Finally, do you use more than one backend server and if so have you  
found a good resolution to the Etag issue. I have tried many of the IIS6  
options I found online with no result. I am getting tempted to block  
the Etag header at the proxy level at this point.

Thanks,  
Craig

Posted at Nginx Forum:

> **[Re: gzip on 7.65 not responding](https://forum.nginx.org/read.php?2,90260,90477#msg-90477)**
>
> I am using version 7.65 on Ubuntu 10 as a reverse proxy. The backend server is running asp pages on iis6. I have the following in my nginx conf file - gzip on; gzip\_disable "MSIE \[1-6\]\\."; gzip\_buffers 16 8k; gzip\_http\_version 1

---

<div class="post-metadata">

**Author:** ![reference123](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/858c86/32.png) [@reference123](https://www.ruby-forum.com/u/reference123)\
**Post date:** [May 26, 2010, 5:56pm UTC](https://www.ruby-forum.com/t/gzip-on-7-65-not-responding/189175/7 "2010-05-26T17:56:05Z")

</div>

On Wed, May 26, 2010 at 10:03 AM, reference123 [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Do you do any type of caching with the proxy and if so, have you had  
> any issues? Â We would like to cache our dynamic asp pages but have  
> been cautious because of viewstate and sessions.

We only cache static items with nginx at the moment (images and  
JS/CSS). Viewstate and sessions can be incompatible with any form of  
caching on a public proxy. Caching a dynamic page only helps if the  
same exact page can be safely delivered to multiple users (such as  
Wikipedia’s pages). You could conceivably add in the session cookie as  
part of proxy\_cache\_key, but that is rather pointless since you can  
have the user’s own browser cache the page with simple “Cache-Control:  
private,max-age=600” set by the [ASP.net](http://ASP.net) code (or even by nginx). If it  
is a custom per-user response anyway, no reason to cache it on your  
proxy, cache it in the browser.

> Finally, do you use more than one backend server and if so have you  
> found a good resolution to the Etag issue. I have tried many of the IIS6  
> options I found online with no result. Â I am getting tempted to block the  
> Etag header at the proxy level at this point.

We have synchronized the E-tag seeds to 0 on all of our IIS boxes  
(there’s an MS knowledge-base article about it). Works like a champ,  
but you also have to make sure all of the files have the same last  
modified date-stamps on all of your back-ends (ROBOCOPY can do this,  
or rsync). You can of course simply also block the Etag header at the  
proxy. We didn’t do that because we have some Tomcat applications that  
set the Etag header dynamically. Apache has similar issues with E-Tags  
in its default configuration (they use filesystem inode numbers).

–  
RPM

---

<div class="post-metadata">

**Author:** ![reference123](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/858c86/32.png) [@reference123](https://www.ruby-forum.com/u/reference123)\
**Post date:** [May 26, 2010, 6:11pm UTC](https://www.ruby-forum.com/t/gzip-on-7-65-not-responding/189175/8 "2010-05-26T18:11:53Z")

</div>

Ryan,

Thanks again for the quick response. One last question, have you tried  
to sync your web farm servers at all with the Microsoft Web Deploy tool  
and if so, did it work well or not? We have been collecting information  
on it but are cautious to implement without more info.

Craig

Posted at Nginx Forum:

> **[Re: gzip on 7.65 not responding](https://forum.nginx.org/read.php?2,90260,90517#msg-90517)**
>
> I am using version 7.65 on Ubuntu 10 as a reverse proxy. The backend server is running asp pages on iis6. I have the following in my nginx conf file - gzip on; gzip\_disable "MSIE \[1-6\]\\."; gzip\_buffers 16 8k; gzip\_http\_version 1

---

<div class="post-metadata">

**Author:** ![reference123](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/858c86/32.png) [@reference123](https://www.ruby-forum.com/u/reference123)\
**Post date:** [May 26, 2010, 5:27pm UTC](https://www.ruby-forum.com/t/gzip-on-7-65-not-responding/189175/9 "2010-05-26T17:27:24Z")

</div>

Luca,

Thank you. I will watch the latency as well. It is running on a AMD  
x64 Dual core with 4 gig of ram and only acting as a reverse proxy at  
the moment (no caching and only 2 simple rewrites). It does have over a  
million pages a month run through it though. We do want to find the  
best balance between all the considerations.

Posted at Nginx Forum:

> **[Re: gzip on 7.65 not responding](https://forum.nginx.org/read.php?2,90260,90485#msg-90485)**
>
> I am using version 7.65 on Ubuntu 10 as a reverse proxy. The backend server is running asp pages on iis6. I have the following in my nginx conf file - gzip on; gzip\_disable "MSIE \[1-6\]\\."; gzip\_buffers 16 8k; gzip\_http\_version 1

---

<div class="post-metadata">

**Author:** ![reference123](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/858c86/32.png) [@reference123](https://www.ruby-forum.com/u/reference123)\
**Post date:** [May 26, 2010, 6:31pm UTC](https://www.ruby-forum.com/t/gzip-on-7-65-not-responding/189175/10 "2010-05-26T18:31:12Z")

</div>

On Wed, May 26, 2010 at 11:10 AM, reference123 [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Thanks again for the quick response. Â One last question, have you tried to sync  
> your web farm servers at all with the Microsoft Web Deploy tool and if so, did it  
> work well or not? Â We have been collecting information on it but are cautious to  
> implement without more info.

Nope, we sync IIS metabase settings by hand using WinMerge and content  
using ROBOCOPY. Our IIS configuration is simple enough and static  
enough to make that feasible. When developers ask for IIS settings  
changes, we ususally point out better ways to handle the issue in  
their code or config files that makes things easier for everybody.

–  
RPM
