Apache

 
 
Apache is a powerful and flexible HTTP/1.1 compliant web server. Originally designed as a replacement for the NCSA HTTP Server, it has grown to be the most popular web server on the Internet. As a project of the Apache Software Foundation, the developers aim to collaboratively develop and maintain a robust, commercial-grade, standards-based server with freely available source code.

The Apache HTTP Server is distributed at no charge for commercial or non-commercial use. For more information read the LICENSE.txt file.

Apache can be used with Microsoft Windows. The Apache HTTP Server Version 2.0 runs under Windows NT, Windows 2000 and Windows XP. You should download the version of Apache for Windows with the .msi extension. This is a single Microsoft Installer file containing Apache, ready to install and run.

The latest Apache HTTP Server version can be downloaded from: http://httpd.apache.org/
The latest Apache 1.3 documentation can be found at: http://httpd.apache.org/docs/1.3/
The latest Apache 2.0 documentation can be found at: http://httpd.apache.org/docs/2.0/
The latest Apache 2.2 documentation can be found at: http://httpd.apache.org/docs/2.2/







HTTP compression.



Information
To reduce the bandwith usage or to increase the download speed of a page, HTTP compression can be applied. Webservers can be configured to compress the pages. Firefox 1.0+, Internet Explorer 4.0+, Netscape 3.0+ etc,. are able to decompress these pages, no plugins are required.

Browsers sends a request header called "Accept-Encoding:" containing the type of compression that they can decompress.
  • Firefox, Accept-Encoding: gzip, deflate
  • Internet Explorer, Accept-Encoding: gzip, deflate
  • Netscape, Accept-Encoding: deflate
More information about HTTP compression can be found at: http://httpd.apache.org/docs/2.0/mod/mod_deflate.html

Operating system used
Windows XP Home Edition Version 5.1 SP 2

Software prerequisites
Apache 2.0.49

Procedure
  1. Open the C:\Tools\Apache Group\Apache2\conf\httpd.conf file and add at the end of the LoadModule list:

    LoadModule deflate_module modules/mod_deflate.so

  2. Uncomment line:

    LoadModule headers_module modules/mod_headers.so

    Note: This is needed to properly handle requests coming from behind proxies.

  3. Add the following lines in the httpd.conf file inside the <Directory> block and at the end of the httpd.conf file:

    Listen 80

    ServerAdmin [email protected]

    ServerName www.mobilefish.com:80

    DirectoryIndex index.html index.html.var index.shtm index.htm

    NameVirtualHost 192.168.1.100

    <VirtualHost 192.168.1.100:80>
       ServerAdmin webmaster@mobilefish.com
       DocumentRoot c:/mobilefish_web
       ServerName www.mobilefish.com
       ErrorLog logs/www.mobilefish.com-error_log
       #TransferLog logs/www.mobilefish.com-access_log
       CustomLog "|c:/weblogs/rotatelogs.exe
          c:/weblogs/www.mobilefish.com-access_%y%m%d.log 86400" combined
       <Directory "c:/mobilefish_web">
           Options +Includes
           AddType text/html shtm
           AddOutputFilter Includes shtm
           AddOutputFilterByType DEFLATE text/html text/plain text/css
           Header append Vary User-Agent
       </Directory>
    </VirtualHost>


    BrowserMatch ^Mozilla/4 gzip-only-text/html
    BrowserMatch ^Mozilla/4\.0[678] no-gzip
    BrowserMatch \bMSIE !no-gzip !gzip-only-text/html


    View the updated httpd.conf file.



  4. Restart Apache.

  5. There are several ways to check if HTTP compression on the webserver is enabled: