Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Problema con compresion GZIP

Discussion in 'Discusión en Español' started by 50l3r, May 21, 2018.

  1. 50l3r

    50l3r Active Member

    Joined:
    Mar 3, 2017
    Messages:
    35
    Likes Received:
    6
    Trophy Points:
    8
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    Saludos,

    Tengo problemas a la hora de activar la compresion gzip.

    He activado el modulo mod_deflate y colocado "zlib.output_compression = On" en todas las versiones de php que manejo.

    Sin embargo, a la hora de activar la compresion total del sitio, veo que los archivos html no los comprime:

    i.gyazo.com/396738214c6efe8517bf124b1fe4110e.png

    He limpiado cache y reiniciado apache pero no da resultado
     
    #1 50l3r, May 21, 2018
    Last edited by a moderator: May 24, 2018
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,442
    Likes Received:
    1,961
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    Can you confirm if you used cPanel >> Optimize Website to enable compression on HTML files?

    Thank you.

    Translation:

    Hola,

    ¿Puedes confirmar si usaste cPanel >> Optimizar sitio web para habilitar la compresión en archivos HTML?

    Gracias.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. 50l3r

    50l3r Active Member

    Joined:
    Mar 3, 2017
    Messages:
    35
    Likes Received:
    6
    Trophy Points:
    8
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    Si:

    i.gyazo.com/0c583fc0c68c603e82b8de3753ecae46.png

    Este es mi .htaccess:

    Code:
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress
    # BEGIN WP-HUMMINGBIRD-CACHING
    <IfModule mod_expires.c>
    ExpiresActive On
    ExpiresDefault A0
    <FilesMatch "\.(txt|xml|js)$">
    ExpiresDefault A691200
    </FilesMatch>
    <FilesMatch "\.(css)$">
    ExpiresDefault A691200
    </FilesMatch>
    <FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav|mp4|m4v|ogg|webm|aac|eot|ttf|otf|woff|svg)$">
    ExpiresDefault A691200
    </FilesMatch>
    <FilesMatch "\.(jpg|jpeg|png|gif|swf|webp)$">
    ExpiresDefault A691200
    </FilesMatch>
    </IfModule>
    <IfModule mod_headers.c>
      <FilesMatch "\.(txt|xml|js)$">
       Header set Cache-Control "max-age=691200"
      </FilesMatch>
      <FilesMatch "\.(css)$">
       Header set Cache-Control "max-age=691200"
      </FilesMatch>
      <FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav|mp4|m4v|ogg|webm|aac|eot|ttf|otf|woff|svg)$">
       Header set Cache-Control "max-age=691200"
      </FilesMatch>
      <FilesMatch "\.(jpg|jpeg|png|gif|swf|webp)$">
       Header set Cache-Control "max-age=691200"
      </FilesMatch>
    </IfModule>
    # END WP-HUMMINGBIRD-CACHING
    # BEGIN WP-HUMMINGBIRD-GZIP
    
    <IfModule mod_deflate.c>
        SetOutputFilter DEFLATE
        <IfModule mod_setenvif.c>
            <IfModule mod_headers.c>
                SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
                RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
            </IfModule>
        </IfModule>
        <IfModule mod_filter.c>
            AddOutputFilterByType DEFLATE "application/atom+xml" \
                                          "application/javascript" \
                                          "application/json" \
                                          "application/ld+json" \
                                          "application/manifest+json" \
                                          "application/rdf+xml" \
                                          "application/rss+xml" \
                                          "application/schema+json" \
                                          "application/vnd.geo+json" \
                                          "application/vnd.ms-fontobject" \
                                          "application/x-font-ttf" \
                                          "application/x-font-opentype" \
                                          "application/x-font-truetype" \
                                          "application/x-javascript" \
                                          "application/x-web-app-manifest+json" \
                                          "application/xhtml+xml" \
                                          "application/xml" \
                                          "font/eot" \
                                          "font/opentype" \
                                          "font/otf" \
                                          "image/bmp" \
                                          "image/svg+xml" \
                                          "image/vnd.microsoft.icon" \
                                          "image/x-icon" \
                                          "text/cache-manifest" \
                                          "text/css" \
                                          "text/html" \
                                          "text/javascript" \
                                          "text/plain" \
                                          "text/vcard" \
                                          "text/vnd.rim.location.xloc" \
                                          "text/vtt" \
                                          "text/x-component" \
                                          "text/x-cross-domain-policy" \
                                          "text/xml"
    
        </IfModule>
        <IfModule mod_mime.c>
            AddEncoding gzip              svgz
        </IfModule>
    
    </IfModule>
    # END WP-HUMMINGBIRD-GZIP
    # php -- BEGIN cPanel-generated handler, do not edit
    # Configure el paquete “ea-php70” como el lenguaje de programación predeterminado “PHP”.
    <IfModule mime_module>
      AddType application/x-httpd-ea-php70 .php .php7 .phtml
    </IfModule>
    # php -- END cPanel-generated handler, do not edit
    
    # BEGIN cPanel-generated php ini directives, do not edit
    # Manual editing of this file may result in unexpected behavior.
    # To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor)
    # For more information, read our documentation (https://go.cpanel.net/EA4ModifyINI)
    <IfModule php7_module>
       php_flag display_errors Off
       php_value max_execution_time 30
       php_value max_input_time 60
       php_value max_input_vars 1000
       php_value memory_limit 64M
       php_value post_max_size 20M
       php_value session.gc_maxlifetime 1440
       php_value session.save_path "/var/cpanel/php/sessions/ea-php70"
       php_value upload_max_filesize 15M
       php_flag zlib.output_compression On
    </IfModule>
    # END cPanel-generated php ini directives, do not edit
    
     
    #3 50l3r, May 21, 2018
    Last edited by a moderator: May 24, 2018
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,442
    Likes Received:
    1,961
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    Can you run the following command for an HTML page on the domain name and let us know the output?

    Code:
    curl -v --compressed http://domain.tld/test.html
    Thank you.

    Translation:

    Hola,

    ¿Puede ejecutar el siguiente comando para una página HTML en el nombre de dominio y dejarnos saber el resultado?

    Code:
    curl -v --compressed http://domain.tld/test.html
    Gracias.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. 50l3r

    50l3r Active Member

    Joined:
    Mar 3, 2017
    Messages:
    35
    Likes Received:
    6
    Trophy Points:
    8
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    Yes [removed]
     
    #5 50l3r, May 21, 2018
    Last edited by a moderator: May 22, 2018
  6. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,442
    Likes Received:
    1,961
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @50l3r,

    It looks like this is caused by your custom .htaccess rules generated by the WordPress plugin you are using. Try creating a sample HTML file larger than 120 bytes and access it from a subdirectory to see if the issue persists. If it doesn't, you may want to check with the support team of the WordPress plugin you are using to determine if it's possible to compress pages it's associated with.

    Thank you.

    Translation:

    Hola @ 50l3r,

    Parece que esto es causado por sus reglas de .htaccess personalizadas generadas por el plugin de WordPress que está utilizando. Intente crear un archivo HTML de muestra de más de 120 bytes y acceda a él desde un subdirectorio para ver si el problema persiste. Si no es así, es posible que desee consultar con el equipo de soporte del plugin de WordPress que está utilizando para determinar si es posible comprimir las páginas a las que está asociado.

    Gracias.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. 50l3r

    50l3r Active Member

    Joined:
    Mar 3, 2017
    Messages:
    35
    Likes Received:
    6
    Trophy Points:
    8
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    yes, if i check - Removed - compression works
     
    #7 50l3r, May 24, 2018
    Last edited by a moderator: May 24, 2018
  8. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,442
    Likes Received:
    1,961
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    In that case, I recommend consulting with the support or development teams of the particular WordPress script you are using to see if they recommend any changes to their required .htaccess rules to allow for the compression of the pages.

    Thank you.

    Translation:

    Olá,

    Nesse caso, recomendo consultar as equipes de suporte ou desenvolvimento do script específico do WordPress que você está usando para ver se elas recomendam qualquer alteração nas regras de .htaccess necessárias para permitir a compactação das páginas.

    Obrigado.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice