NANOWEB, the aEGiS PHP web server


The HyperTextTransferProtocol defines methods to transmit files in encoded formats from server to client. These encodings focus on compression (the only one used nowadays is GNU's gzip) to speed up transmissions over the internet.
This module handles transparent compression (activated when a browser states it supports it) without requiring you to change anything to your files.
Note that this procedure gives a little overhead on the server side as well as for the client, but especially decompression is amazingly fast and the many times faster download of html files via today still used modems should encourage you to activate this module.

As this module is now internally implemented as filter, there are different ways to activate it:

# standard method (tries to compress every file)
GzipEnable = 1

# or activated with a Filter rule (here for all files)
Filter = */* gzip

# or (only tries to compress text files)
Filter = text/* gzip

To activate it for 'text/*' files only is probably a good idea, as most other file types rarely can be compressed that well.
There are also some general options for this module you may wish to tweak:

# compression level (1 - 9)
GzipLevel = 5

# send uncompressed if size didn't reduce significantly
GzipMaxRatio = 90

Note that mod_gzip currently doesn't compress output of CGI scripts (which often comes in chunks), so you may want to apply the "unchunk" Filter before "gzip".
For PHP scripts you should activate "zlib output compression" in the php.ini or activate the "ob_gzhandler" in every script. This is safer and also some nanoseconds faster than using nanowebs mod_gzip.

NANOWEB, the aEGiS PHP web server