Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have nginx sitting on port 80, redirecting requests to a play framework server as described by deployment docs.

I have verified that the server by default does not compress by doing the steps provided by zoul in this question. However as in the question when passed that gzip is supported, content is compressed.

There is also this question who fixed it by doing a full restart. This however does not work for me.

I suspect that Acceptable encoding is dropped somewhere, however I dont know how to check/fix it.

Can anyone provide clues? Thanks.

Unbuntu 11.10, with nginx 1.2 The /etc/nginx/nginx.conf snippet is as follows (if needed).

##
# Gzip Settings
##

gzip on;
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;
expires modified +168h;
share|improve this question
    
Are you using it within the proper context? (i.e. within http {} or deeper) –  Sašo Apr 26 '12 at 7:54
    
@Sašo: Yeah, I am using it as part of http context. I basically uncommented the section which came commented in the default nginx.conf. –  Nasir Apr 26 '12 at 11:20

1 Answer 1

Make sure you have gzip installed and working on your server first. If Gzip is not working or if there is any other conflict, then the process won't work even when you uncomment these lines in nginx conf.

share|improve this answer
    
I will verify. As of now, it still doesn't gzip properly, so probably that might be a clue. –  Nasir May 1 '12 at 12:38
    
If you can't try troubleshooting with Gzip, there are other workarounds on the internet for your desired operating systems. Make sure all your supporting modules are on and that they don't conflict with each other. –  Sameer Manas May 1 '12 at 18:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.