Installing mod_gzip

Posted on 2005-04-17
Last Modified: 2013-12-13
I want to install the mod_zip because I read that this will accelerate  my strore (oscommerce) ..Is it true?

I download the ApacheModuleGzip.dll and I set lis line in th httpd.conf

LoadModule gzip_module "c:/php/ApacheModuleGzip.dll"

But it didn´t work.

Do I need to configure other things?

The error message  Can not load "c:/php/ApacheModuleGzip.dll" the specified module could not be found.

I put the ApacheModuleGzip.dll in c:/php directory c:/windows and c:/windows/system32 but it didn´t work.

May you help me.


Question by:rtorresmtz
    LVL 8

    Accepted Solution

    It should be put in your modules directory of apache (Althought the others should work...):

    LoadModule gzip_module modules/ApacheModuleGzip.dll

    Also make sure to set the proper directives for mod_gzip in your httpd.conf!

    PS. Did you also check that the proper rights were set? Ie. that apache may execute the file?


    Author Comment


    May you be more explicite about the proper directives I need to set and how to set the right for the execution of apache?
    LVL 8

    Expert Comment

    There are quite some things that can be set. Maybe better to provide a link:

    Probably you won't need half of them or even maybe more), but it's always good to know what is possible.

    Author Comment

    do I have to compile mod_gzip.c with the modification are showed in the link you send me?

    Is another way to do it with out to compile this file
    LVL 8

    Expert Comment

    No, no, it's not necesary when you use the pre-compiled dll as a load module. The link was just provided because it gives a nice overview of all possible settings for your httpd.conf.

    Author Comment

    Then do you mean I need to add all this line to the  httpd.conf file?

    LoadModule gzip_module modules/ApacheModuleGzip.dll

    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             /tmp
    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_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
    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
    mod_gzip_send_vary            On

    LVL 8

    Expert Comment

    Depending on which you will use, yes. (When you use the default vlue it won't be necessary to set the setting; then again, you are sure what is used).

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
    Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
    Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
    The viewer will learn how to count occurrences of each item in an array.

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now