Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 12 of 12
  1. #1
    Member This forum account has been confirmed by cPanel staff to represent a vendor. Radio_Head's Avatar
    Join Date
    Feb 2002
    Posts
    2,064

    Default mod_gzip optimization

    Cpanel install a preconfigured mod_gzip installing apache

    I suggest these modifications

    FROM
    mod_gzip_maximum_file_size 0
    TO
    mod_gzip_maximum_file_size 500000

    0 means unlimited and it could be a problem with extremely large html files

    FROM
    mod_gzip_temp_dir /tmp
    TO
    mod_gzip_temp_dir /tmp/gzip
    (don't forget to do #mkdir /tmp/gzip;chmod 777 /tmp/gzip)

    so you can track mod_gzip usage better .

    FROM
    mod_gzip_maximum_inmem_size 1000000
    TO
    mod_gzip_maximum_inmem_size 60000

    (I cannot understand why Cpanel set a value so high, 1000000 ! It could cause problems)


    then I suggest you to ADD
    mod_gzip_min_http 1000
    mod_gzip_handle_methods GET POST


    REMOVE LINE
    mod_gzip_item_exclude reqheader "User-agent: Mozilla/4.0[678]"
    bugzilla
    http://bugzilla.cpanel.net/show_bug.cgi?id=1458

    Infact documents writes
    # From version 1.3.19.2a on I advise against using filters
    # for User-agents, as this will cause HTTP-Headers 'Vary: User-Agent'
    # to be generated


    If you want log for some time to check out it works
    ADD
    LogFormat "%h %l %u %t \"%V %r\" %<s %b mod_gzip: %{mod_gzip_result}n In:%{mod_gzip_input_size}n -< Out:%{mod_gzip_output_size}n = %{mod_gzip_compression_ratio}n pct." common_with_mod_gzip_info2

    CustomLog logs/mod_gzip.log common_with_mod_gzip_info2
    mod_gzip_add_header_count Yes


    Restart apache

    To understand messages received in mod_giz log file
    read http://www.schroepl.net/projekte/mod_gzip/status.htm



    Then comment these lines if you are just using a php accelerator (for example mmcache)
    #mod_gzip_item_include file \.php$
    #mod_gzip_item_include file \.phps$
    #mod_gzip_item_include mime ^application/x-httpd-php.*



    DOCUMENTATION
    http://www.schroepl.net/projekte/mod_gzip/config.htm
    Last edited by Radio_Head; 10-21-2004 at 03:12 AM.
    Stop SPAM & VIRUS :: ASSP Deluxe for cPanel http://www.grscripts.com
    █ ASSP Deluxe is supported by Fritz Borgstedt,ASSP main developer.

  2. #2
    Member
    Join Date
    Aug 2004
    Posts
    39

    Default

    Thanks for the post

  3. #3
    Member This forum account has been confirmed by cPanel staff to represent a vendor. Radio_Head's Avatar
    Join Date
    Feb 2002
    Posts
    2,064

    Default

    Quote Originally Posted by pcdior
    Thanks for the post

    good to see someone read it
    Stop SPAM & VIRUS :: ASSP Deluxe for cPanel http://www.grscripts.com
    █ ASSP Deluxe is supported by Fritz Borgstedt,ASSP main developer.

  4. #4
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Jun 2003
    Posts
    647

    Default

    Agreed, very useful post.

  5. #5
    Member
    Join Date
    Sep 2003
    Posts
    147

    Default

    Some additions for the configuration:

    mod_gzip_send_vary Yes

    <Files ~ "\.(gif|jpe?g|png|bmp)$">
    mod_gzip_on no
    </Files>

  6. #6
    Member
    Join Date
    Nov 2003
    Posts
    521

    Default

    I read it when you first posted it ... was waiting to see if cpanel responded to it though.

  7. #7
    Member This forum account has been confirmed by cPanel staff to represent a vendor. Radio_Head's Avatar
    Join Date
    Feb 2002
    Posts
    2,064

    Default

    After 6 months (!!!) they are finally considering my bugzilla ..
    http://bugzilla.cpanel.net/show_bug.cgi?id=1458
    Stop SPAM & VIRUS :: ASSP Deluxe for cPanel http://www.grscripts.com
    █ ASSP Deluxe is supported by Fritz Borgstedt,ASSP main developer.

  8. #8
    Member
    Join Date
    Jan 2005
    Posts
    1,880

    Default

    Quote Originally Posted by Rubas
    <Files ~ "\.(gif|jpe?g|png|bmp)$">
    mod_gzip_on no
    </Files>
    Instead of this you could include the line:

    Code:
    mod_gzip_item_exclude mime ^image/
    This comparision seems a little less intentsive than the above quoted comparision and so might reduce load a little.

    Although please correct me if I'm wrong!

  9. #9
    Member
    Join Date
    Mar 2002
    Posts
    70

    Default

    Quote Originally Posted by Radio_Head
    After 6 months (!!!) they are finally considering my bugzilla ..
    http://bugzilla.cpanel.net/show_bug.cgi?id=1458
    This bug has recently been added to the database. Nobody has validated that this bug is true. Users who have the "canconfirm" permission set may confirm this bug, changing its state to NEW. Or, it may be directly resolved and marked RESOLVED.

    Looks like it still isn't ready for prime time?

  10. #10
    Member dynaweb's Avatar
    Join Date
    May 2003
    Location
    Oregon
    Posts
    55

    Default

    Sorry to resurrect, but it will surely be helpful to some. You say
    FROM
    mod_gzip_temp_dir /tmp
    TO
    mod_gzip_temp_dir /tmp/gzip
    (don't forget to do #mkdir /tmp/gzip;chmod 777 /tmp/gzip)

    so you can track mod_gzip usage better .
    but beware of this RE http://forums.cpanel.net/showthread.php?t=45139

  11. #11
    Member
    Join Date
    Mar 2006
    Location
    Brno, Czech Republic
    Posts
    510

    Default

    this is really cool. gotta check it out.
    Not everything that is counted counts and not everything that counts can be counted

  12. #12
    Member
    Join Date
    May 2007
    Posts
    20

    Default

    I would suggest using Apache's deflate module instead of gzip, since it is still unstable in cPanel.

Similar Threads & Tags
Similar threads

  1. mmcache and mod_gzip
    By Radio_Head in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 10-21-2004, 02:38 AM
  2. Mod_gzip
    By therowan in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 05-06-2003, 07:46 PM
  3. Mod_Gzip??? Need help
    By buccaneerob in forum cPanel and WHM Discussions
    Replies: 6
    Last Post: 04-16-2003, 07:20 AM
  4. mod_gzip
    By jmc67 in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 02-19-2003, 07:27 PM
  5. mod_gzip
    By Ajeesh in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 04-12-2002, 10:56 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube