GZip issues
I have a server that's not comprssing the output for any of the sites.
I've been though many suggestion in this forum, but nothing seems to work.
We do have another server with the same version of WHM & it is working on there & as far as I can see, the configuration is the same.
mod_deflate is installed in EasyApache 4
zlib.output_compression is anebled in the MultiPHP INI Editor for the php version being used (PHP7.3)
"Compress All Content" is selected in the cPanel for the sites
The .htaccess file has the following:
In the php.ini for each site, there is a line for: zlib.output_compression On Does anyone know where I can check next?
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE image/x-icon
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/x-font
AddOutputFilterByType DEFLATE application/x-font-truetype
AddOutputFilterByType DEFLATE application/x-font-ttf
AddOutputFilterByType DEFLATE application/x-font-otf
AddOutputFilterByType DEFLATE application/x-font-opentype
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
AddOutputFilterByType DEFLATE font/ttf
AddOutputFilterByType DEFLATE font/otf
AddOutputFilterByType DEFLATE font/opentype
# For Olders Browsers Which Can't Handle Compression
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
In the php.ini for each site, there is a line for: zlib.output_compression On Does anyone know where I can check next?
-
Hey there! Since you have already compared the settings to another WHM system, it might be best to open a ticket with our team so we can check this directly on the server. If you do that, please post the ticket number here so I can follow along and keep the community updated with our findings. 0 -
Any update on this issue? I'll appreciate the update I have the same problem! 0 -
I don't have any additional details on my end as I don't see the original poster submitted a ticket. You could get a ticket in to our team and then post the number here so I can keep everyone updated. 0 -
Sorry for the delay... support ticket is 94307792 0 -
Thanks for getting that submitted - I'm following along on my end now and I'll keep this thread updated with the findings. 0 -
It looks like we were able to isolate the issue to something within the CMS as compression on plain files outside of the CMS area was working properly. Let us know if you need us to check anything else! 0 -
Hi there I've narrowed this down even further... it's definately NOT the CMS. As mentioned on the ticket, I've setup a new account on the server & have uploaded a file & set the .htaccess to compress. This is working & the output is compressed as expected on ) this file is compressed as expected. In my .htaccess file, i've added the following at the top... Options +FollowSymlinks RewriteEngine On # Rewrite to 'public' folder RewriteCond %{HTTP_HOST} ^www.mysite.com$ RewriteCond %{REQUEST_URI} !public/ RewriteRule (.*) public/$1 [L]
This is to redirect all traffic to the sub-folder - so the URL of the page is now ) it IS compressed. So, something is preventing the compression when the RewriteRule is used. I've tried simple things like re-ordering the .htaccess file & changing the folder name, but nothing seems to work. As mentioned at the start, I have another server running the same WHM/cPanel & have replicated this on that box & it all works as expected. Thanks for your suggestions!0 -
Could you let us know that through the ticket so we can do some additional testing? 0 -
I see that ticket was updated now - thanks! 0
Please sign in to leave a comment.
Comments
9 comments