mod_unzip: transparently access ZIP archives via Apache
mod_unzip
is a small Apache 2.0 module to transparently access files
that are compressed in a ZIP
archive. Since the ZIP format has
an index for all files in the archive, accesses are very
fast. The module also allows to browse the content of the
ZIP archive by directory.
Dependencies
The only dependencies for the module are:
-
Info-Zip unzip binary which can be executed by the Apache
user (http://www.info-zip.org/,
comes with most Linux distributions)
- apxs2 – the Apache Extension Tool to compile the module
- libmagic + headers (libmagic-dev) to determine the correct MIME type of the files in the archive
How to install
- Download the source file
-
Adjust 'UNZIP_EXEC' to the path of your unzip program (e.g.
/usr/bin/unzip)
- as root compile with
root@somewhere# apxs2 -i -c mod_unzip.c -lmagic
- load the module within your
httpd.confLoadModule unzip_module /usr/lib/apache2/modules/mod_unzip.so
AddType application/zip .zip
- restart webserver