Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 9 of 9
  1. #1
    Member
    Join Date
    Dec 2003
    Location
    Brisbane, Australia
    Posts
    65

    Default Installing mod_gzip on Linux

    . Login as root user to your server
    2. Create /home/modgziptmp directory

    #mkdir /home/modgziptmp
    #chmod 5777 /home/modgziptmp

    3. Grab mod_gzip 1.3.26a.1a source files and place them in /usr/local/src

    #cd /usr/local/src
    #wget http://telia.dl.sourceforge.net/sour...-1.3.26.1a.tgz

    4. Extract files and change to directory

    #tar xfz mod_gzip-1.3.26.1a.tgz
    #cd mod_gzip-1.3.26.1a

    5. Compile/install mod_gzip by typing 2 commands (note path/to/apxs maybe different on your server)

    #make APXS=/usr/local/apache/bin/apxs
    #make install APXS=/usr/local/apache/bin/apxs

    6. Add the mod_gzip configuration settings after mod_gzip.c in httpd.conf

    mod_gzip_on Yes
    mod_gzip_can_negotiate Yes
    mod_gzip_static_suffix .gz
    AddEncoding gzip .gz
    mod_gzip_update_static No
    mod_gzip_command_version '/mod_gzip_status'
    mod_gzip_temp_dir /home/modgziptmp
    mod_gzip_keep_workfiles No
    mod_gzip_minimum_file_size 500
    mod_gzip_maximum_file_size 500000
    mod_gzip_maximum_inmem_size 60000
    mod_gzip_min_http 1000
    mod_gzip_handle_methods GET POST
    mod_gzip_item_exclude reqheader "User-agent: Mozilla/4.0[678]"
    mod_gzip_item_include file .html$
    mod_gzip_item_include file .shtml$
    mod_gzip_item_include file .htm$
    mod_gzip_item_include file .shtm$
    mod_gzip_item_include file .php$
    mod_gzip_item_include file .phtml$
    mod_gzip_item_exclude file .js$
    mod_gzip_item_exclude file .css$
    mod_gzip_item_include file .pl$
    mod_gzip_item_include handler ^cgi-script$
    mod_gzip_item_include mime ^text/html$
    mod_gzip_item_include mime ^text/plain$
    mod_gzip_item_include mime ^httpd/unix-directory$
    mod_gzip_item_exclude mime ^image/
    mod_gzip_dechunk Yes
    mod_gzip_add_header_count Yes
    mod_gzip_send_vary Yes

    7. Restart apache

    #/etc/rc.d/init.d/httpd stop
    #/etc/rc.d/init.d/httpd start

    8. Check to see if mod_gzip is installed by going to http://leknor.com/code/gziped.php and enter the server url[/url]
    Thanks,

    Bill, Lover & Strong supporter of Cpanel.

  2. #2
    Member
    Join Date
    Oct 2003
    Posts
    13

    Default

    Or simply recompile apache in WHM and check the mod_gzip checkbox

    Has worked perfectly for me.

  3. #3
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    Installing mod_gzip on Linux
    I wish you'd post the implications of your little (sometimes pointless) howto posts.

    A warning for those who think - oh, I'll install that. Mod_gzip helps you reduce data transfer from your server. If you don't have a data transfer quota problem, don't install mod_gzip, especially if you have any performance issues as it will only add to the load of your server.
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  4. #4
    Member
    Join Date
    Feb 2004
    Location
    Sydney, Australia
    Posts
    57

    Default

    Any figures as to what kind of a performance hit you take from gzip'd sites?
    God is in his own heaven and all is right with the world.
    http://magi.net.au - Have some fun!

  5. #5
    Member
    Join Date
    Oct 2003
    Posts
    13

    Default

    It also speeds up loading of large pages tremendously, for large HTML documents I typically get 85-92% smaller file sizes, which gives a huge difference in downloading time for modem users, and a noticeable difference for broadband users - the pages seem to appear instantly instead of taking half a second.

    It does have some downsides, the load on the server goes up a bit so it's not recommended for overloaded servers.
    It is also known to be incompatible with mod_ssl so if you rely on SSL it's not recommended.

  6. #6
    Member casey's Avatar
    Join Date
    Jan 2003
    Location
    If there is trouble, it will find me
    Posts
    2,336

    Default

    Quote Originally Posted by thechronic
    It is also known to be incompatible with mod_ssl so if you rely on SSL it's not recommended.
    Yep. Found that out the hard way just last week...

  7. #7
    Moderator cPanel Partner NOC Badge dgbaker's Avatar
    Join Date
    Sep 2002
    Location
    Toronto, Ontario Canada
    Posts
    2,773

    Default

    Never had an issue mod_ssl and mod_gzip both have worked fine on multiple installations. Both have worked well without doing anything extra.
    Regards,
    David
    Forum Moderator

  8. #8
    Member chrisbuk's Avatar
    Join Date
    Dec 2003
    Location
    Liverpool, United Kingdom
    Posts
    314
    cPanel/Enkompass Access Level

    DataCenter Provider

    Default

    Hi

    I know this is a really old thread but i found it while researching installing Mod_GZIP

    i followed the instruction but I have a issue when i go to step make install APXS=/usr/local/apache/bin/apxs

    this happens when i paste the command

    root@vm1 [/usr/local/src/mod_gzip-1.3.26.1a]# make install APXS=/usr/local/apache/bin/apxs
    /usr/local/apache/bin/apxs -A -i mod_gzip.so
    apxs:Error: Sorry, cannot determine bootstrap symbol name.
    apxs:Error: Please specify one with option `-n'.
    make: *** [install] Error 1

    using apache 2.2 with PHP 5.2.14
    Cyber Host Pro Ltd
    Windows & Linux Hosting & Reseller Hosting Solutions
    Superb Fast Response Support
    http://www.cyberhostpro.com

  9. #9
    Member
    Join Date
    Nov 2004
    Posts
    37

    Thumbs up

    mod_deflate has replaced Apache 1.3's mod_gzip in Apache2. so use mod_deflate

    Prashant

Similar Threads & Tags
Similar threads

  1. Fix for installing mod_gzip
    By phoenixdarkdirk in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 02-03-2008, 08:06 PM
  2. Installing zlib onto Linux servers
    By billau in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 08-01-2004, 05:09 AM
  3. Installing GD on Linux Servers
    By billau in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 07-31-2004, 02:47 PM
  4. Installing unzip on Linux servers
    By billau in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 07-31-2004, 02:46 PM
  5. Installing IPTables on Linux 7.3 i686
    By Diatone in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 07-10-2003, 04:23 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube