1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

mod deflate not working

Discussion in 'Plesk 10.x for Linux Issues, Fixes, How-To' started by KLuser, Feb 2, 2012.

  1. KLuser

    KLuser New Pleskian

    13
    35%
    Joined:
    Feb 2, 2012
    Messages:
    10
    Likes Received:
    0
    Hi All,
    i'm trying to enable mod_deflate on my vhost and when i run a test web page I see that it is not compressed ...
    Could to someone help to solve this problem please ?

    Apache 2.2.3-53
    CentOS 5.7
    Plesk 10.2

    the file /etc/httpd/conf/httpd.conf contains lines below :

    LoadModule deflate_module modules/mod_deflate.so
    LoadModule headers_module modules/mod_headers.so

    And I modified the file located here :

    /var/www/vhosts/mydomain.com/conf/13058295130.00376000_httpd.include

    and added lines below :

    AddOutputFilterByType DEFLATE text/plain
    AddOutputFilterByType DEFLATE text/xml
    AddOutputFilterByType DEFLATE text/html
    AddOutputFilterByType DEFLATE text/css
    AddOutputFilterByType DEFLATE image/svg+xml
    AddOutputFilterByType DEFLATE application/xhtml+xml
    AddOutputFilterByType DEFLATE application/xml
    AddOutputFilterByType DEFLATE application/rss+xml
    AddOutputFilterByType DEFLATE application/atom_xml
    AddOutputFilterByType DEFLATE application/x-javascript
    AddOutputFilterByType DEFLATE application/x-httpd-php
    AddOutputFilterByType DEFLATE application/x-httpd-fastphp
    AddOutputFilterByType DEFLATE application/x-httpd-eruby

    # Activation du filtre de compression
    SetOutputFilter DEFLATE

    # Netscape 4.x a quelques soucis, on ne compresse que le html
    BrowserMatch ^Mozilla/4 gzip-only-text/html

    # Les versions de Netscape 4.06-4.08 ont quelques soucis
    BrowserMatch ^Mozilla/4\.0[678] no-gzip

    # Comme d'habitude, internet explorer pose probleme
    BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

    # Ne pas compresser ce type de fichiers
    SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
    SetEnvIfNoCase Request_URI \.(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary
    SetEnvIfNoCase Request_URI \.(?:pdf|avi|mov|mp3|mp4|rm)$ no-gzip dont-vary

    # Proxies
    Header append Vary User-Agent env=!dont-vary

    # enable resulting html compression
    #php_flag zlib.output_compression on

    Thanks
     
  2. KLuser

    KLuser New Pleskian

    13
    35%
    Joined:
    Feb 2, 2012
    Messages:
    10
    Likes Received:
    0
    Ok I found it ...
    I had to restart the whole server and not only apache !!!

    Regards
    Kl

     
Loading...