April 3, 20188 yr 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?
April 3, 20188 yr 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.
April 3, 20188 yr Author @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.
April 3, 20188 yr try to set gzip_http_version 1.0, or alternatively gzip_http_version 1.0 - this could help, according to this article
April 3, 20188 yr Author Setting gziphttpversion 1.0 doesn't change anything, still the same problem.
April 3, 20188 yr 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?
April 3, 20188 yr Author Yes, there was a mistake. I had changed it to gzipminlength and of course restarted nginx. Gtmetrix still show the same problem with compression.
April 17, 20188 yr Author 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 </files> ``` I dont't know why but it works.
May 22, 20188 yr Mh, that is good news but I also would be interested in an explanation. Perhaps you could ask the admin while also saying thank you to him :)
May 22, 20188 yr It has to do with using older Apache versions. The older versions will not take multiple arguments like the new does.
Create an account or sign in to comment