Gzip does not working with nginx + directadmin

suuforest

New member
Joined
Jul 25, 2015
Messages
3
Dear,

I used directadmin and install latest version of nginx version in directadmin.
Current version nginx: 1.8.1

This is nginx-gzip.conf configs:

Code:
gzip on;
gzip_static on;
gzip_disable "msie6";
gzip_http_version 1.1;
gzip_vary on;
gzip_comp_level 6;
gzip_proxied any;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript text/x-js;
gzip_buffers 16 8k;

This config created by directadmin.
Current, gzip module does not work.

This is response header of css file:

Code:
HTTP/1.1 200 OK
Server: nginx
Date: Wed, 17 Feb 2016 12:55:01 GMT
Content-Type: text/css
Last-Modified: Wed, 17 Feb 2016 09:40:31 GMT
Connection: keep-alive
Vary: Accept-Encoding
Etag: W/"56c4400f-14cdb3"
Content-Length: 1363379

This error happen when directadmin update nginx version to 1.8.1
Last time. it still working but now it not work.

Sorry, my english is not good.
Please check and help me fix this.

Thank you
 
Hello,

Did you send "Accept-Encoding: gzip" in your HTTP request?

Check your link with:

Code:
curl -H "Accept-Encoding: gzip" -I http://domain.com/file.css

for example:

Code:
# curl -H "Accept-Encoding: gzip" -I https://www.nginx.com/wp-content/plugins/columns/columns.css
HTTP/1.1 200 OK
Server: nginx
Date: Wed, 17 Feb 2016 17:49:54 GMT
Content-Type: text/css
Last-Modified: Mon, 04 May 2015 13:15:56 GMT
Connection: keep-alive
Vary: Accept-Encoding
ETag: W/"5547710c-227"
Expires: Thu, 31 Dec 2037 23:55:55 GMT
Cache-Control: max-age=315360000
Access-Control-Allow-Origin: *
[B]Content-Encoding: gzip[/B]
 
This is request header in firefox browser:

Code:
GET /wp-content/cache/suu/cached_c2172656f83edc8874ca6726739c3b2d/sitecss_de0cf08b9b200414ed5b4a376d1d5e07.css?ver=4.4.2 HTTP/1.1
Host: www.iosappsave.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:44.0) Gecko/20100101 Firefox/44.0 FirePHP/0.7.4
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
DNT: 1
Cookie: __cfduid=d36c25f4a27056a698a97a18d6e01ba121455543463
x-insight: activate
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache

This is Response Header:
Code:
HTTP/1.1 200 OK
Server: nginx
Date: Thu, 18 Feb 2016 03:14:20 GMT
Content-Type: text/css
Last-Modified: Wed, 17 Feb 2016 09:40:31 GMT
Connection: keep-alive
Vary: Accept-Encoding
Etag: W/"56c4400f-14cdb3"
Content-Length: 1363379

In the old version of nginx. Gzip was working but it is not working on new version of directadmin and nginx 1.8.1.
Thank you
 
Check this:

https://gtmetrix.com/reports/www.iosappsave.com/0W1IRzjc
http://www.whatsmyip.org/http-compression-test/?url=aHR0cDovL3d3dy5pb3NhcHBzYXZlLmNvbS8=
http://www.giftofspeed.com/gzip-test/

And you will see gzipping is working fine.

Code:
# curl -H "Accept-Encoding: gzip" -I http://www.iosappsave.com/
HTTP/1.1 200 OK
Server: nginx
Date: Thu, 18 Feb 2016 03:29:16 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Vary: Accept-Encoding
X-Powered-By: PHP/5.6.18
Set-Cookie: e3b1f61a616b235200741ad582a879300496dc25=4u0nvk03he83ve5emjre33snt0; expires=Thu, 18-Feb-2016 13:29:16 GMT; Max-Age=36000; path=/; domain=.iosappsave.com
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Link: <http://www.iosappsave.com/wp-json/>; rel="https://api.w.org/"
Link: <http://www.iosappsave.com/>; rel=shortlink
[B]Content-Encoding: gzip[/B]
 
Back
Top