NAME
wnupdatewww - enable access to standard directories through wn HTTP server
SYNOPSIS
wnupdatewww (-d|-c|-o target_directory) (-i|-m src_directory [-a name] [-r])
DESCRIPTION
wnupdatewww is a Debian specific sh(1) program that is part of the wn(1) HTTP server package. wn(1) will not serve files in a directory without an index.cache file. wnupdatewww provides two methods for supplying a simple default index.cache file that will enable access to all files in a directory hierarchy.
You should only use this program when there are no restriction of any sort on who can access the files. If there are restrictions, I strongly recommend that you supply your own index file and run wndex(8) directly.
The first method, which I recommended, mirrors a directory hierarchy but not its contents. wnupdatewww recursively examines each directory. If a directory already contains both an index and index.cache file, it sets a symbolic link to that directory and doesn't recurse into any subdirectories. Otherwise it creates both the index and index.cache files that allow access indirectly through wn(1) using the File-Module directive (seed http:/doc/wn/module.html). This is combined with wncat(1) to provide transparent decompression of HTML files. The original directory hierarchy is not modified by this method so it is appropriate for read-only hierarchies. The downside is the disk space required which amount to 1.7 Mbytes for /usr/doc on my system. Also, problematic is the effort required to keep the mirror consistent with the original directory hierarchy. This has been automated with /etc/cron.daily/wn which is described in wn(1) overview.
The second approach is to recurse through a directory hierarchy and create both the index and index.cache files that allow access to all files in the directory directly. This is simpler than the first approach and more efficient space wise. The disadvantages is that it requires write-access to the "source" directory.
OPTIONS
- -a name
-
Define an alias name for the "target" directory when creating a mirror of "source" directory. Can only be used when the option -m is supplied.
- -c
-
Use wn_www_root/cgi-bin as "target" directory where wn_www_root is defined in /etc/wn/wn.conf configuration file. The directory must exist. One and only one of the options -d -c -o must be supplied.
- -d
-
Use wn_www_root/doc as "target" directory where wn_www_root is defined in /etc/wn/wn.conf configuration file. The directory must exist. One and only one of the options -d -c -o must be supplied.
- -i
-
Recurses into "target" directory and insert a wn(1) index and index.cache files in each subdirectory. The index file simple grants access to any file in the directory. Note that this modifies the "target" directory so it won't work on read-only directories.
- -m src_directory
-
Mirrors src_directory "source" directory into "target" directory with optionally the alias name defined by the -a option and insert a wn(1) index and index.cache file in each subdirectory. The index file uses redirection to the original directory location and supports transparently compressed and uncompressed files. Executable files are referred to by symbolic links. Note that this doesn't modify src_directory and can be used for read-only directories.
- -o directory
-
Use target_directory as "target" directory. The directory must exist. Note that if it is not in the wn www root directory, access will not be possible. Symbolic links can be used however. One and only one of the options -d -c -o must be supplied.
- -r
-
Remove the previous contents of target directory before mirroring the source directory. Can only be used with the -m option.
EXAMPLES
To mirror the entire /usr/doc hierarchy in /var/www/doc with overwriting of all existing directories:
updatewww -o /var/www -m /usr/doc -r
To mirror the /opt/wn/doc hierarchy in /var/www/doc/wn without overwriting any other directories:
updatewww -d -m /opt/wn/doc -a wn
To insert index and index.cache files directly into /var/www/dwww use:
updatewww -o /var/www/dwww -i
FILES
- index
-
Input file to wndex(8) program.
- index.cache
-
Output file from wndex(8) program which defines access control for directory.
- /etc/wn/wn.conf
-
Main Debian specific configuration file for wn(1) package.
SEE ALSO
wn(1), wn_mkdigest(1), wn_uncache(1), wndex(1), wnindexmaker(1), wnpnuts(1), wnauth(3), wncat(3), wnhtmlify(3), wnredir(3), wnsectsearch(3), wnseven_m(3), wn_md5passwd(8), wn_mkpasswd(8), wnconfig(8), wnd(8), wnsd(8), wnv2c(8)
http:/doc/wn/manual.html
http://hopf.math.nwu.edu/
AUTHOR
wn is written by John Franks <[email protected]>. Modified by Jean Pierre LeJacq <[email protected]> as part of packaging for the Debian GNU/Linux distribution. Manual page also added by Jean Pierre LeJacq.