home
mod_ziplook2
ZIP-file viewer module for Apache 2.0.X.
Original mod_ziplook was for apache 1.3.
Status: beta
Current:
mod_ziplook2-0.99.tar.gz
Author: jukka pihl
email: jukka.pihl@iki.fi
News 2003.05.13
- 0.99 - this is beta version
- unzip-library is not included.
News 2003.03.17
- Just converted to apache 2.0 (from 1.3)
- Version is not much tested. Certainly not thread-safe.
Use only with prefork thread-model.
What is it?
With mod_ziplook apache module you can view zip-archive files
directly in apache without extracting them to filesystem.
It's usefull with large documentation zip-files which are not
very often hit.
Module uses
miniunzip - unzip library and that uses
zlib.
unzip21.zip
Features
- Whole directory structure of ZIP-file can be seen.
- Separate files can be seen easily (/xxxx.zip/dir/afile.html)
- In case of directories index.html is looked. (/y/x.zip/dir/ => /y/x.zip/dir/index.html)
- Handles If-Modified-Since and NotModified-status
- If your browser supports gzip content-encoding and
documents in ZIP-archive are "Deflate"-compressed: module
changes files to gzip format in fly. This makes things very
fast (and server cpu & network capasity is saved)
Example
(This doesn't work currently because this httpd-server runs now Apache-2)
In this directory I have one small zip-file "zip_form.zip", which is
can be viewed with this module.
zip_form.zip - whole zip archive
zip_form.zip/zip.txtone file from there
History
Sun Java SDK 1.4 came middle of feb-2002. I installed it and it's
documentation to my home machine which had not very much empty
space left in hard-disk. It had big documentation zip-file (31M),
for which I couldn't find enough room without removing some older stuff.
I got idea that it would be nice to have apache-module that can
read zip-files in fly.
After few evenings (and part of days) here is a little module.
Now module runs also with apache2.
Install and config
- Module needs zlib in your computer
I haven't tested this apxs configuration yet.
A. Open tar.gz - file.
B. find your apxs (apache module handling script)
C. Compile (with zlib)
apxs -c mod_ziplook.c -lz
D. Run installing script (as root is needed)
apxs -i -a mod_ziplook.so
E. Add handler to for 'zip'-files in httpd.conf
(look mod_mime.c section)
AddHandler ziplook zip
F. Restart your apache
G. Seek an zip-file and try with it.
http://your.host/directory/myzipfile.zip
http://your.host/directory/myzipfile.zip/a-file-in-zip-file.html
To make static module:
$ cd apache-2.0.XXX/modules
$ tar -xzvf /somewhere/mod_ziplook2.tar.gz
$ cd ..
$ ./buildconf
$ ./configure .... --enable-deflate --enable-ziplook
$ make
(enable-deflate is to -lz library included)
Todo
- - Memory leaks must be checked
- - Some configuration directives could be fine
- - Fetching zip-file as whole
- - Seeing zip-directories as separate entities (not just one big directory listing)
- - index.html system is hardcoded
Thanks to ...
Gilles Vollant (author unzip-library) for giving ideas and support
All ideas are wellcome.
Links.
Version
current 0.99
old