home
mod_ziplook
ZIP-file viewer module for Apache 1.3.X
mod_ziplook2 for apache-2.0.
Status: beta (but works).
Current:
mod_ziplook-2002.08.07.tar.gz
Olds:
mod_ziplook-2002.02.26.tar.gz
ziplook-2002.02.22-b.tar.gz
Author: jukka pihl
email: jukka.pihl@iki.fi
News 2003.03.17
- mod_ziplook2 for apache-2.0.
News 2002.08.07
- Simpler Accept-Encoding handling
- ziplook note for logging puposes.
You can put %{ziplook}n to your log-format.
News 2002.02.26
- If http-client understands gzip 'Accept-Encoding: gzip,x-gzip'
and file is 'deflate'-compressed, file is sent back in gzip-
format. Major performance advantage.
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
.
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.
Install and config
- Module needs zlib in your computer
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
Todo
- - Make Apache-2.0 version
- - 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.