• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Installing gzip

L

linuxxphybrid

Guest
Plesk 7.5 does not install gzip. Is this correct? If so, how I do install gzip? What is the most ideal installation method?
 
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.
 
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?
 
Originally posted by linuxxphybrid
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?

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 ;)
 
Originally posted by EvolutionCrazy
apache2 ha a new BUILT IN module to support the output compression
This means every single copy of Apache2 has this feature, right?
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 ;) [/B]
Here's what I keep wondering. How come isn't this feature enabled from the start?
 
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 ;)
 
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.
 
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:
 
Originally posted by kram
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:

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..
 
WICKED

Thanks allot,

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

Works great now thanks!
 
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.
 
Originally posted by faris
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.

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 ;)
 
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?)
 
Thank you EvolutionCrazy! I've just enabled it and HTML loads incredibly faster!

Regards,

Narcís
 
Back
Top