koraledrewniane Posted April 3, 2018 Posted April 3, 2018 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?
datakick Posted April 3, 2018 Posted April 3, 2018 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.
koraledrewniane Posted April 3, 2018 Author Posted April 3, 2018 Thanks @datakick for the answear. I'll read about that.
koraledrewniane Posted April 3, 2018 Author Posted April 3, 2018 @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.
datakick Posted April 3, 2018 Posted April 3, 2018 try to set gzip_http_version 1.0, or alternatively gzip_http_version 1.0 - this could help, according to this article
koraledrewniane Posted April 3, 2018 Author Posted April 3, 2018 Setting gziphttpversion 1.0 doesn't change anything, still the same problem.
datakick Posted April 3, 2018 Posted April 3, 2018 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?
koraledrewniane Posted April 3, 2018 Author Posted April 3, 2018 Yes, there was a mistake. I had changed it to gzipminlength and of course restarted nginx. Gtmetrix still show the same problem with compression.
koraledrewniane Posted April 5, 2018 Author Posted April 5, 2018 No, DirectAdmin, but i also have access by SSH.
koraledrewniane Posted April 17, 2018 Author Posted April 17, 2018 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.
Pedalman Posted May 22, 2018 Posted May 22, 2018 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 :)
lesley Posted May 22, 2018 Posted May 22, 2018 It has to do with using older Apache versions. The older versions will not take multiple arguments like the new does.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now