54.9 Enabling Web Server Data Compression

By enabling data compression on your Web server, you can increase performance for all WebAccess users. However, because this is a change to the configuration of your Web server, it affects all programs that interact with the Web server. A side effect of enabling data compression might be a decline in Web server scalability.

54.9.1 Apache 2 on NetWare 6.5

  1. Download Apache 2.0/2.2 for NetWare from the Apache Software Foundation .

  2. Extract deflate.nlm from the distribution and copy it to the sys:\apache2\modules directory.

  3. Change to the sys:\apache2\conf directory and open the httpd.conf file in a text editor.

  4. Locate the LoadModule entries in the file.

  5. Add the following entry:

    LoadModule deflate_module modules/deflate.nlm   <IfModule mod_deflate.c>
        AddOutputFilterByType DEFLATE text/html text/plain text/xml
        DeflateFilterNote Input  instream
        DeflateFilterNote Output outstream
        DeflateFilterNote Ratio  ratio
        LogFormat '%{ratio}n%%\t%{outstream}n\t%{instream}n\t"%r"'
                    deflate
        CustomLog "|sys:/apache2/bin/rotlogs.nlm sys:/apache2/logs/
                   deflate_log 5M" deflate
       </IfModule>
    

    NOTE:Lines that appear wrapped in the above example should be entered in the httpd.conf file as single lines without line wrapping.

  6. Save the httpd.conf file and exit the text editor.

  7. Restart Apache.

54.9.2 Apache 2 on Open Enterprise Server (OES) Linux

  1. As root, change to the /etc/opt/novell/httpd/conf directory and open the httpd.conf file.

  2. Locate the LoadModule entries in the file.

  3. Add the following entry:

    LoadModule deflate_module modules/mod_deflate.so
       <IfModule mod_deflate.c>
        AddOutputFilterByType DEFLATE text/html text/plain text/xml
        DeflateFilterNote Input  instream
        DeflateFilterNote Output outstream
        DeflateFilterNote Ratio  ratio
        LogFormat '%{ratio}n%%\t%{outstream}n\t%{instream}n\t"%r"'
                   deflate
        CustomLog logs/deflate_log deflate
       </IfModule>
    

    NOTE:Lines that appear wrapped in the above example should be entered in the httpd.conf file as single lines without line wrapping.

  4. Save the httpd.conf file and exit the text editor.

  5. Restart Apache.

For more information about data compression on Apache, see Apache Module mod_deflate on the Apache Software Foundation Web site.

54.9.3 Apache 2 on SUSE Linux Enterprise Server 9

The steps for Apache 2 on SUSE Linux Enterprise Server 9 are essentially the same as those for Novell Open Enterprise Server, as described in Section 54.9.2, Apache 2 on Open Enterprise Server (OES) Linux, except that you need to know the location of the httpd.conf file in your Apache installation.

54.9.4 Microsoft Internet Information Server (IIS) on Windows 2003

  1. Open IIS Manager.

  2. Right-click Web Sites, then click Properties.

  3. Select Compress Application Files and Compress Static Files.

  4. Click OK to save the compression settings.

  5. Restart IIS.

For more information about data compression on IIS, see Using HTTP Compression for Faster Downloads on Microsoft TechNet.