1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice

Installing gzip

Discussion in 'Plesk for Linux - 8.x and Older' started by linuxxphybrid, Jun 5, 2005.

  1. linuxxphybrid

    linuxxphybrid Guest

    0
     
    Plesk 7.5 does not install gzip. Is this correct? If so, how I do install gzip? What is the most ideal installation method?
     
  2. jamesyeeoc

    jamesyeeoc Guest

    0
     
    First make sure that gzip is not already on your system. At the command line, do a

    rpm -q gzip

    If it's not already present, you should be able to install it from a standard gzip rpm as-is, should have zero negative effect on Plesk itself.
     
  3. linuxxphybrid

    linuxxphybrid Guest

    0
     
    I totally mis-phrased my question. Sorry.

    What I want to do is to install mod_gzip for Apache2 that comes with Plesk 7.5. How do I do that?
     
  4. EvolutionCrazy

    EvolutionCrazy Basic Pleskian

    23
    90%
    Joined:
    Jun 4, 2005
    Messages:
    65
    Likes Received:
    0
    apache2 ha a new BUILT IN module to support the output compression

    to enanble it:

    Code:
    nano /etc/httpd/conf/httpd.conf
    and add at the end of the file:
    Code:
    AddOutputFilterByType DEFLATE text/html text/plain text/xml application/x-httpd-php
    in that way html, xml and php files will be gzipped on the fly ;)
     
  5. linuxxphybrid

    linuxxphybrid Guest

    0
     
    This means every single copy of Apache2 has this feature, right?
    Here's what I keep wondering. How come isn't this feature enabled from the start?
     
  6. EvolutionCrazy

    EvolutionCrazy Basic Pleskian

    23
    90%
    Joined:
    Jun 4, 2005
    Messages:
    65
    Likes Received:
    0
    yes, every copy of apache2 include that module:

    mod_deflate

    ;)

    just do what i've written above, then do a

    Code:
    service httpd restart
    and test that your pages are compressed:
    http://www.whatsmyip.org/mod_gzip_test/

    ;)

    httpd is readed at every start of the httpd service (apache) so you don't need to do anything to get i started on boot...

    it will start by default ;)
     
  7. jamesyeeoc

    jamesyeeoc Guest

    0
     
    Just a note: nano is a text editor which may not be installed on all OSs. Alternatives to nano would include vi and pico.

    Also, the httpd.conf file is often overwritten by Plesk (such as when upgrading), so keep this in mind as well.
     
  8. kram@

    kram@ Regular Pleskian

    26
    40%
    Joined:
    Dec 11, 2003
    Messages:
    152
    Likes Received:
    2
    Location:
    South Africa
    Hello,

    I followed your instrauctions:

    to enanble it:

    nano /etc/httpd/conf/httpd.conf

    and add at the end of the file:

    AddOutputFilterByType DEFLATE text/html text/plain text/xml application/x-httpd-php

    restarted the service and visited http://www.whatsmyip.org/mod_gzip_test/ which said this page is not compressed?

    Any ideas?
    :confused:
     
  9. EvolutionCrazy

    EvolutionCrazy Basic Pleskian

    23
    90%
    Joined:
    Jun 4, 2005
    Messages:
    65
    Likes Received:
    0
    uhm...

    open httpd.conf and make sure that you have loaded the mod_deflate module...

    you have to have a line like:
    Code:
    LoadModule deflate_module modules/mod_deflate.so
    without any # at the beginning...

    look also at:
    tail -30 /var/log/httpd/error_log

    after you restart the httpd service

    to see if there's any error related to deflate module..
     
  10. kram@

    kram@ Regular Pleskian

    26
    40%
    Joined:
    Dec 11, 2003
    Messages:
    152
    Likes Received:
    2
    Location:
    South Africa
    WICKED

    Thanks allot,

    Just had to add:
    LoadModule deflate_module modules/mod_deflate.so

    Works great now thanks!
     
  11. faris

    faris Guest

    0
     
    Be aware that using these options will cause problems with some sites or even just some pages on some sites (depending on what the pages do).

    This is probably why is it not enabled by default.

    Faris.
     
  12. EvolutionCrazy

    EvolutionCrazy Basic Pleskian

    23
    90%
    Joined:
    Jun 4, 2005
    Messages:
    65
    Likes Received:
    0
    exact.. you can experience some problems with php pages that try to dinamically generate a content with a particular mime-type... or some problems with the ob_gzlib used in a lot of php forums/cms...

    (however i think that if it's possible it's better to compress the output with deflate instead of using ob_gzhandler and other phplevel functions ;)
     
  13. faris

    faris Guest

    0
     
    Ah. Interesting. Thanks!

    Faris.
     
  14. ProfiTiger

    ProfiTiger Guest

    0
     
    I had to add the "load_module..." with path to /usr/lib/apache2-prefork/module_deflate.so, otherwhise, httpd did not restart.
    Normaly, I add all my changes for httpd.conf into server-tuning.conf. It seems, that this file is not rebuilt by plesk (anybody experience with this file?)
     
  15. narcis010

    narcis010 Guest

    0
     
    Thank you EvolutionCrazy! I've just enabled it and HTML loads incredibly faster!

    Regards,

    Narcís
     
Loading...