gzip not working!

HSG

Verified User
Joined
Oct 7, 2015
Messages
31
Hi,
I have a vps with this configs:

CentOS 6.7 x64
DirectAdmin 1.49.1
Apache_NginX + PHP-FPM

I install apache_nginx and php-fpm from CustomBuild 2.0
I don't edit apache or nginx default configs but the gzip compression not active in my server while gzip is active in both /etc/httpd/confs/extra/httpd-deflate.conf and /etc/nginx/nginx-gzip.conf files.

Content of /etc/httpd/confs/extra/httpd-deflate.conf file:
Code:
#
# Required modules: mod_deflate
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/2.2/mod/mod_deflate.html>
# for further details before you try to setup deflate module.
#

<Location />
# Insert filter
SetOutputFilter DEFLATE

# Netscape 4.x has some problems...
BrowserMatch ^Mozilla/4 gzip-only-text/html

# Netscape 4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4\.0[678] no-gzip

# MSIE masquerades as Netscape, but it is fine
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

# Don't compress images and other uncompressible content
SetEnvIfNoCase Request_URI \
 \.(?:gif|jpe?g|png|rar|zip|exe|flv|swf|mov|wma|mp3|mp4|avi|mp?g)$ no-gzip dont-vary

# Make sure proxies don't deliver the wrong content
Header append Vary User-Agent env=!dont-vary
</Location>


Content of /etc/nginx/nginx-gzip.conf file:
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;


What is problem?
Sorry for my bad English.
Thanks.
 
I presume you did install gzip itself?

yum install gzip

I don't install anything manually, everythings is installed with DirectAdmin.
gzip is also installed with DirectAdmin and now yum install gzip output:
Package gzip-1.3.12-22.el6.x86_64 already installed and latest version
 
Yep I know you ment http gzip compression but as far as I know you need to have gzip installed for that. I was just making sure it was.
So it's installed, so far so good.

Maybe there are too much settings in your nginx gzip conf. Can you try with this to see if it works then? Just as a test?
gzip on;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
gzip_proxied any;
gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript image/x-icon image/bmp image/svg+xml;
gzip_vary on;

Otherwise maybe Sellerone can give some advise on how to fix it?
 
I don't edit apache or nginx default configs but the gzip compression not active in my server while gzip is active in both /etc/httpd/confs/extra/httpd-deflate.conf and /etc/nginx/nginx-gzip.conf files.

How do you detect that HTTP GZIP is not working? Give us some URLs where it does not work, so we could check it for you.
 
I leave my vps and buy a reseller account.
For this i don't want to help about gzip.
Thanks.
 
Back
Top