Compression not working
I'm having trouble getting compression working on a VPS server for a client. I've enabled "compress all content" from inside the individual account cpanel. I can confirm that this is properly adding the following code to the .htaccess file in the account root.
Under "Tweak settings" > "Compression", I have the default settings. I can also confirm that the package "ea-apache24-mod_deflate" is installed in my current easyapache 4 config. I'm little puzzled because I've never encountered this issue before... it always just worked out of the box. Any advice would be appreciated!
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
# NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48
# the above regex won't work. You can use the following
# workaround to get the desired effect:
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
# Don't compress images
SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png)$ no-gzip dont-vary
# Make sure proxies don't deliver the wrong content
Header append Vary User-Agent env=!dont-vary
Under "Tweak settings" > "Compression", I have the default settings. I can also confirm that the package "ea-apache24-mod_deflate" is installed in my current easyapache 4 config. I'm little puzzled because I've never encountered this issue before... it always just worked out of the box. Any advice would be appreciated!
-
I'm having trouble getting compression working on a VPS server for a client. I've enabled "compress all content" from inside the individual account cpanel. I can confirm that this is properly adding the following code to the .htaccess file in the account root.
Hello, You can use the following command after uploading a test file to the domain name to verify if the content is compressed:curl -v --compressed http://www.test.domain/test.html
Could you run this command and let us know the output? Thank you.0 -
Hello, You can use the following command after uploading a test file to the domain name to verify if the content is compressed:
curl -v --compressed http://www.test.domain/test.html
Could you run this command and let us know the output? Thank you.
> GET /test.html HTTP/1.1 > Host: [intentionally excluded] > User-Agent: curl/7.43.0 > Accept: */* > Accept-Encoding: deflate, gzip > < HTTP/1.1 200 OK < Date: Wed, 07 Sep 2016 18:15:53 GMT < Server: Apache < Last-Modified: Wed, 07 Sep 2016 18:14:31 GMT < Accept-Ranges: bytes < Content-Length: 26 < Vary: User-Agent < Cache-Control: max-age=31536050 < Content-Type: text/html
I initially noticed the problem when using google's pagespeed test, but I've also used sites like0 -
Could you open a support ticket using the link in my signature so we can take a closer look? You can post the ticket number here so we can update this thread with the outcome. Thank you. 0 -
Could you open a support ticket using the link in my signature so we can take a closer look? You can post the ticket number here so we can update this thread with the outcome. Thank you.
Thanks for the quick response, Michael. Support Request ID is: 76534110 -
Thanks for the quick response, Michael. Support Request ID is: 7653411
Issue resolved. For anyone wondering, because I used easyapache4 with muti php, I needed to addoutput_handler = Off zlib.output_compression = On zlib.output_handler = ob_gzhandler
to the specific php.ini file (in my case php7). Just enabling compression was not enough to get it working with php files.0 -
Issue resolved. For anyone wondering, because I used easyapache4 with muti php, I needed to add
output_handler = Off zlib.output_compression = On zlib.output_handler = ob_gzhandler
to the specific php.ini file (in my case php7). Just enabling compression was not enough to get it working with php files.
---------------------------------- @cPanelMichael ==> Is there any ETA for this bug in the recent cPanel versions?0 -
Hello @Jaison V John, Internal case EA-5367 is still open, however there's no specific time frame on it's release date. Adding those entries to the specific php.ini file utilized by the domain name is still required at this time. The case is scheduled for an additional look once the work to ensure all PHP INI editors offered in cPanel/WHM account for all PHP versions and handlers. Thank you. 0 -
Hello, To update, cPanel version 68 will add the zlib.output_compression option to the MultiPHP INI Editor feature in cPanel and WHM. Additionally, a note in the "Optimize Website" feature within cPanel will direct users on how to enable the zlib.output_compression option for PHP. Thank you. 0
Please sign in to leave a comment.
Comments
8 comments