Jump to content
thirty bees forum

Problem with gzip compression


Recommended Posts

Hi from Poland

I'm new in this forum. I run shop with ThirtyBees 1.0.3 cms and Warehouse theme from IqitCommerce on VPS - koraledrewniane.pl

Everything works great for me until i started my site seo optimization.

All my CCC settings are turned on. The problem is when i run page analysis on gtmetrics.com. Google Speed score says to enable gzip compression on two files: http://koraledrewniane.pl/themes/warehouse/cache/v57e9e488e51b540995632eae9d70d0811ball.css http://koraledrewniane.pl/themes/warehouse/cache/v41_b77e132c440c69afc28f0a38b7a71ef1.js

I have mod_deflate enabled on server.

What can be wrong?

Link to comment
Share on other sites

your nginx (reverse proxy?) server is probably not configured correctly. You can read more about this here.

Note: If you use nginx in front of apache server then you don't need to have mod_deflate enabled on apache at all. That will have negative impact on overall performance. Let nginx gzip this instead.

Link to comment
Share on other sites

@datakick this is content of my nginx.conf file:

user nginx;

worker_processes auto; pid /var/run/nginx.pid;

error_log logs/error.log;

error_log logs/error.log notice;

error_log logs/error.log info;

events { include /etc/nginx/nginx-events.conf; } http { include /etc/nginx/mime.types; # For user configurations not maintained by DirectAdmin. Empty by default. include /etc/nginx/nginx-includes.conf;

and my nginx-gzip.conf file: gzip on; gzipstatic always; gzipdisable "msie6"; gziphttpversion 1.1; gzipvary on; gzipcomplevel 8; gzipproxied any; gziptypes text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript text/x-js image/svg+xml; gzipbuffers 16 8k; gzipminlenght 256;

Everything seems to be ok.

Link to comment
Share on other sites

I've just tried your configuration on my test server and it works just fine.

Well, what strange is that there's a typo in gzip_min_lenght that needed to be fixed first, otherwise nginx failed to restart. How come your server managed to restart with this typo in config file? Is the nginx-gzip.conf file actually included ? And did you actually restart nginx to reload settings?

Link to comment
Share on other sites

  • 2 weeks later...

The problem is solved. I forced my server administrator to resolve it. He removed this lines from .htaccess:

<IfModule mod_deflate.c> <IfModule mod_filter.c> AddOutputFilterByType DEFLATE text/html text/css text/javascript application/javascript application/x-javascript font/ttf application/x-font-ttf font/otf application/x-font-otf font/opentype </IfModule> </IfModule>

and add this: ``` # compress html, css, javascript, text, xml and fonts AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE application/rss+xml AddOutputFilterByType DEFLATE application/x-font AddOutputFilterByType DEFLATE application/x-font-opentype AddOutputFilterByType DEFLATE application/x-font-otf AddOutputFilterByType DEFLATE application/x-font-truetype AddOutputFilterByType DEFLATE application/x-font-ttf AddOutputFilterByType DEFLATE application/x-javascript AddOutputFilterByType DEFLATE application/xhtml+xml AddOutputFilterByType DEFLATE application/xml AddOutputFilterByType DEFLATE font/opentype AddOutputFilterByType DEFLATE font/otf AddOutputFilterByType DEFLATE font/ttf AddOutputFilterByType DEFLATE image/svg+xml AddOutputFilterByType DEFLATE image/x-icon AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE text/javascript AddOutputFilterByType DEFLATE text/plain AddOutputFilterByType DEFLATE text/xml

# you can also compress by file type/extension:
<files *.html>
    SetOutputFilter DEFLATE


I dont't know why but it works.

Link to comment
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...