The is the Debian package for the WN, a server for the Hypertext Transfer Protocol (HTTP/1.1). This document describes how the Debian package modification and configurations that I made to the upstream source.
I've added the following programs to the WN upstream source:
I've dropped the prototype digest authentication module. It uses the RSAREF code which could cause copyright problems.
WN is configurable at both compile-time and run-time. To
build this package, I made choices
that might not suit your needs. Some of these choices can be
overridden by using the proper set of options in the configuration
files I provided in the WN configuration directory
/etc/wn
. The file
/etc/wn/wn.rc
is a wrapper script that reads in
configuration information from the file
/etc/wn/wn.conf
. Both files are sh
shell scripts. The /etc/wn/wn.rc
should not
require any modification. The configuration file includes the
variables:
wn_www_root_virtual
mandatory
The WN virtual hosts file that defines alternate root
of www data hierarchy. The Debian standard location is
/etc/wn/wn.hosts
. This can be set to empty
which will force WN to use only a single root directory defined
by wn_www_root
.
wn_www_root
mandatory
The root of www data hierarchy. The Debian standard location is
/var/www
.
Alternately, if you desire to use a virtual hosts list
file, provide an entry for wn_www_root_virtual
with the full path to the virtual hosts file.
wn_daemon
mandatory
Full path to program to execute. This will either the
inetd
based server wnd
or the
stand-alone server wnsd
. If you change this value,
you must update your Debian inetd
and
rc.d
configuration. Alternatively, you can use the
program wnconfig
which will update both consistently.
wn_log_format
optional
Command line option that control the log format used by the server.
wn_log_format_debug
optional
Command line option that controls if debugging information is written to log files.
wn_log_format_syslog
optional
Command line option that controls
if logging uses UNIX syslogd
.
wn_log_file_access
[ " " | "<directory>" ]
optional
Command line options that sets
which file to use for logging normal access information. If syslog is defined to
y
, you should update your syslog configuration to
use this value since the WN package will not update it.
If the empty string ""
is used as the value of this
option then no access logging will be done. If not defined,
uses the compiled in default which is
/var/log/wn/wn_access.log
.
wn_log_file_error [
" " | "<directory>" ]
optional
Command line options that sets
which file to use for logging error messages. If the empty
string ""
is used as the value then the WN
access log file is used. If syslog is defined to
y
, you should update your syslog configuration to
use this value since the WN package will not update it.
wn_user
Command line options that control access, authentication and execution of CGI programs.
Here are the choices I made to build the binary package and which server options or index file attributes to use to override.
Both the stand-alone and the inetd
daemons
run under uid and gid of www-data
. This is
consistent with the Debian
Apache package but differs from the WN default of
nobody
and nogroup
. For security
reasons, no files served by WN should be owned by
either the www-data
user or group.
When using the server to log directly to specific log files, these
files must be write-able by either the user or group that the
server runs as. This may be seen as a security risk since the
log files are therefore vulnerable to modification by a
malicious user gaining control of the server. The use of
WN's syslog
capability eliminates this vulnerability. It is not the
default since this requires configuration of syslogd
which is not the domain of this package.
Logging is enabled.
Logging to dedicated files.
syslog
uses facility LOG_LOCAL7
.
This is consistent with the default Apache
ErrorLog
directive. I haven't confirmed if
this is the case with the Debian
Apache package. The default WN facility is LOG_DAEMON
.
Using LOG_LOCAL7
helps isolate the httpd messages
from the other daemon messages. This might cause conflict with
messages from Apache if it is installed at the same time with
WN.
Logging to specific "access" and "error" log files.
CERN common log format.
Server pid written to /var/run/wn.pid.
CGI scripts enabled.
Root of public WWW directory is /var/www.
Root of user WWW directory is ~/www.
User with uid less than 100 cannot have user WWW directory.
WWW maintainer email address URL is "mailto:webmaster@localhost".
Use "/etc/mime.types".
Use default hostname from system.
Server logo is WN.
Port is 80 for stand-alone daemon.
Enter DNS hostnames in logfiles.
Check DNS hostnames.
Default URI is index.html.
CGI extension is "*.cgi
".
CGI directory is "cgi-bin
".
Virtual hosts enabled.
Here are list of tasks that I'm at least contemplating for WN. They are roughly in order of when I plan to start them. My main guide is to increase robustness before adding new functionality. Feel free to email me if you have additional suggestions or would like to help.
The WN documentation has many links, some of which are broken. I need to a reliable way of checking them.
/usr/doc/wn/examples/counter.html
.
Including the perl code directly is incorrect since there are
certain characters that are interpreted as HTML tags or
attributes. I need to investigate the wnhtmlify
program.
The information is in this file but I should provide man pages for them as well.
I believe that cacheformat
is the only remaining
file that should be converted.
Currently I'm relying on the upstream author's index file which I know is out of date. This should be part of the documentation Makefile.
Current all the pages have their own header and footers. This makes it difficult to maintain consistency.
Currently its confusing to locate all this information as it is spread across the manual. Further, not all the utilities and CGI programs are documented. I'd like to organize the manual similar to what I've done for the WN man pages.
The main missing piece is support for the link "other documents". I suppose that I can generate a directory listing for those packages that aren't registered with dhelp. Need to interface with the dhelp's maintainer.
wnconfig
to debconf.
Debconf is an implementation of the Debian Configuration management Proposal.
The one I have is terrible. Need to work with upstream author on this one.
I currently don't have this included. Need to work out how to use standard Debian RSA package with this.
An SSL version is available and is essential. The trouble is finding a non-US collaborator.