summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbuild/binbuild.sh300
-rw-r--r--docs/docroot/apache_pb.gifbin2326 -> 0 bytes
-rw-r--r--docs/manual/bind.html.en135
-rw-r--r--docs/manual/cgi_path.html.en93
-rw-r--r--docs/manual/content-negotiation.html.en588
-rw-r--r--docs/manual/custom-error.html.en177
-rw-r--r--docs/manual/developer/API.html1153
-rw-r--r--docs/manual/developer/modules.html.en200
-rw-r--r--docs/manual/dso.html.en393
-rw-r--r--docs/manual/handler.html.en195
-rw-r--r--docs/manual/index.html.en65
-rw-r--r--docs/manual/install.html.en270
-rw-r--r--docs/manual/invoking.html.en220
-rw-r--r--docs/manual/mod/directive-dict.html.en265
-rw-r--r--docs/manual/mpm.html.en96
-rw-r--r--docs/manual/new_features_2_0.html.en51
-rw-r--r--docs/manual/platform/netware.html278
-rw-r--r--docs/manual/platform/perf-bsd44.html254
-rw-r--r--docs/manual/platform/perf-dec.html285
-rw-r--r--docs/manual/platform/perf-hp.html122
-rw-r--r--docs/manual/platform/perf.html175
-rw-r--r--docs/manual/platform/readme-tpf.html208
-rw-r--r--docs/manual/platform/unixware.html62
-rw-r--r--docs/manual/platform/windows.html547
-rw-r--r--docs/manual/sections.html.en170
-rw-r--r--docs/manual/stopping.html.en183
-rw-r--r--docs/manual/suexec.html.en518
-rw-r--r--docs/manual/vhosts/fd-limits.html.en59
-rw-r--r--docs/manual/vhosts/index.html.en65
-rw-r--r--docs/manual/vhosts/name-based.html.en164
-rw-r--r--httpd.dsp415
-rw-r--r--libhttpd.def396
-rw-r--r--modules/aaa/mod_auth_anon.dsp115
-rw-r--r--modules/arch/win32/mod_isapi.c570
-rw-r--r--modules/generators/mod_info.dsp114
-rw-r--r--modules/generators/mod_status.dsp115
-rw-r--r--modules/mappers/mod_rewrite.dsp119
-rw-r--r--modules/mappers/mod_speling.dsp115
-rw-r--r--modules/metadata/mod_cern_meta.dsp115
-rw-r--r--modules/metadata/mod_expires.dsp115
-rw-r--r--modules/metadata/mod_headers.dsp115
-rw-r--r--modules/metadata/mod_usertrack.dsp115
-rw-r--r--modules/proxy/mod_proxy.dsp133
-rw-r--r--server/mpm/winnt/mpm_winnt.c1863
-rw-r--r--server/mpm/winnt/mpm_winnt.h82
-rw-r--r--server/mpm/winnt/registry.c555
-rw-r--r--server/mpm/winnt/service.c524
47 files changed, 0 insertions, 12867 deletions
diff --git a/build/binbuild.sh b/build/binbuild.sh
deleted file mode 100755
index 1e2f454ff0..0000000000
--- a/build/binbuild.sh
+++ /dev/null
@@ -1,300 +0,0 @@
-#!/bin/sh
-#
-# binbuild.sh - Builds an Apache binary distribution.
-# Initially written by Lars Eilebrecht <lars@apache.org>.
-#
-# This script falls under the Apache License.
-# See http://www.apache.org/docs/LICENSE
-
-OS=`src/helpers/GuessOS`
-case "x$OS" in
- x*390*) CONFIGPARAM="--with-layout=BinaryDistribution --enable-module=most";;
- *) CONFIGPARAM="--with-layout=BinaryDistribution --enable-module=most --enable-shared=max";;
-esac
-APDIR=`pwd`
-APDIR=`basename $APDIR`
-VER=`echo $APDIR |sed s/apache_//`
-TAR="`src/helpers/PrintPath tar`"
-GTAR="`src/helpers/PrintPath gtar`"
-GZIP="`src/helpers/PrintPath gzip`"
-
-if [ x$1 != x ]
-then
- USER=$1
-else
- USER="`src/helpers/buildinfo.sh -n %u@%h%d`"
-fi
-
-if [ ! -f ./ABOUT_APACHE ]
-then
- echo "ERROR: The current directory contains no valid Apache distribution."
- echo "Please change the directory to the top level directory of a freshly"
- echo "unpacked Apache 1.3 source distribution and re-execute the script"
- echo "'./src/helpers/bindbuild.sh'."
- exit 1;
-fi
-
-if [ -d ./CVS ]
-then
- echo "ERROR: The current directory is a CVS checkout of Apache."
- echo "Only a standard Apache 1.3 source distribution should be used to"
- echo "create a binary distribution."
- exit 1;
-fi
-
-echo "Building Apache $VER binary distribution..."
-echo "Platform is \"$OS\"..."
-
-( echo "Build log for Apache binary distribution" && \
- echo "----------------------------------------------------------------------" && \
- ./configure $CONFIGPARAM && \
- echo "----------------------------------------------------------------------" && \
- make clean && \
- rm -rf bindist install-bindist.sh *.bindist
- echo "----------------------------------------------------------------------" && \
- make && \
- echo "----------------------------------------------------------------------" && \
- make install-quiet root="bindist/" && \
- echo "----------------------------------------------------------------------" && \
- make clean && \
- echo "----------------------------------------------------------------------" && \
- echo "[EOF]" \
-) > build.log 2>&1
-
-if [ ! -f ./bindist/bin/httpd ]
-then
- echo "ERROR: Failed to build Apache. See \"build.log\" for details."
- exit 1;
-fi
-
-echo "Binary image successfully created..."
-
-./bindist/bin/httpd -v
-
-echo "Creating supplementary files..."
-
-( echo " " && \
- echo "Apache $VER binary distribution" && \
- echo "================================" && \
- echo " " && \
- echo "This binary distribution is usable on a \"$OS\"" && \
- echo "system and was built by \"$USER\"." && \
- echo "" && \
- echo "The distribution contains all standard Apache modules as shared" && \
- echo "objects. This allows you to enable or disable particular modules" && \
- echo "with the LoadModule/AddModule directives in the configuration file" && \
- echo "without the need to re-compile Apache." && \
- echo "" && \
- echo "See \"INSTALL.bindist\" on how to install the distribution." && \
- echo " " && \
- echo "NOTE: Please do not send support-related mails to the address mentioned" && \
- echo " above or to any member of the Apache Group! Support questions" && \
- echo " should be directed to the \"comp.infosystems.www.servers.unix\"" && \
- echo " or \"comp.infosystems.www.servers.ms-windows\" newsgroup" && \
- echo " (as appropriate for the platform you use), where some of the" && \
- echo " Apache team lurk, in the company of many other Apache gurus" && \
- echo " who should be able to help." && \
- echo " If you think you found a bug in Apache or have a suggestion please" && \
- echo " visit the bug report page at http://www.apache.org/bug_report.html" && \
- echo " " && \
- echo "----------------------------------------------------------------------" && \
- ./bindist/bin/httpd -V && \
- echo "----------------------------------------------------------------------" \
-) > README.bindist
-cp README.bindist ../apache_$VER-$OS.README
-
-( echo " " && \
- echo "Apache $VER binary installation" && \
- echo "================================" && \
- echo " " && \
- echo "To install this binary distribution you have to execute the installation" && \
- echo "script \"install-bindist.sh\" in the top-level directory of the distribution." && \
- echo " " && \
- echo "The script takes the ServerRoot directory into which you want to install" && \
- echo "Apache as an option. If you ommit the option the default path" && \
- echo "\"/usr/local/apache\" is used." && \
- echo "Make sure you have write permissions in the target directory, e.g. switch" && \
- echo "to user \"root\" before you execute the script." && \
- echo " " && \
- echo "See \"README.bindist\" for further details about this distribution." && \
- echo " " && \
- echo "Please note that this distribution includes the complete Apache source code." && \
- echo "Therefore you may compile Apache yourself at any time if you have a compiler" && \
- echo "installation on your system." && \
- echo "See \"INSTALL\" for details on how to accomplish this." && \
- echo " " \
-) > INSTALL.bindist
-
-( echo "#!/bin/sh" && \
- echo "#" && \
- echo "# Usage: install-bindist.sh [ServerRoot]" && \
- echo "# This script installs the Apache binary distribution and" && \
- echo "# was automatically created by binbuild.sh." && \
- echo " " && \
- echo "lmkdir()" && \
- echo "{" && \
- echo " path=\"\"" && \
- echo " dirs=\`echo \$1 | sed -e 's%/% %g'\`" && \
- echo " mode=\$2" && \
- echo " " && \
- echo " set -- \${dirs}" && \
- echo " " && \
- echo " for d in \${dirs}" && \
- echo " do" && \
- echo " path=\"\${path}/\$d\"" && \
- echo " if test ! -d \"\${path}\" ; then" && \
- echo " mkdir \${path}" && \
- echo " if test \$? -ne 0 ; then" && \
- echo " echo \"Failed to create directory: \${path}\"" && \
- echo " exit 1" && \
- echo " fi" && \
- echo " chmod \${mode} \${path}" && \
- echo " fi" && \
- echo " done" && \
- echo "}" && \
- echo " " && \
- echo "lcopy()" && \
- echo "{" && \
- echo " from=\$1" && \
- echo " to=\$2" && \
- echo " dmode=\$3" && \
- echo " fmode=\$4" && \
- echo " " && \
- echo " test -d \${to} || lmkdir \${to} \${dmode}" && \
- echo " (cd \${from} && tar -cf - *) | (cd \${to} && tar -xf -)" && \
- echo " " && \
- echo " if test \"X\${fmode}\" != X ; then" && \
- echo " find \${to} -type f -print | xargs chmod \${fmode}" && \
- echo " fi" && \
- echo " if test \"X\${dmode}\" != X ; then" && \
- echo " find \${to} -type d -print | xargs chmod \${dmode}" && \
- echo " fi" && \
- echo "}" && \
- echo " " && \
- echo "##" && \
- echo "## determine path to (optional) Perl interpreter" && \
- echo "##" && \
- echo "PERL=no-perl5-on-this-system" && \
- echo "perls='perl5 perl'" && \
- echo "path=\`echo \$PATH | sed -e 's/:/ /g'\`" && \
- echo " " && \
- echo "for dir in \${path} ; do" && \
- echo " for pperl in \${perls} ; do" && \
- echo " if test -f \"\${dir}/\${pperl}\" ; then" && \
- echo " if \`\${dir}/\${pperl} -v | grep 'version 5\.' >/dev/null 2>&1\` ; then" && \
- echo " PERL=\"\${dir}/\${pperl}\"" && \
- echo " break" && \
- echo " fi" && \
- echo " fi" && \
- echo " done" && \
- echo "done" && \
- echo " " && \
- echo "if [ .\$1 = . ]" && \
- echo "then" && \
- echo " SR=/usr/local/apache" && \
- echo "else" && \
- echo " SR=\$1" && \
- echo "fi" && \
- echo "echo \"Installing binary distribution for platform $OS\"" && \
- echo "echo \"into directory \$SR ...\"" && \
- echo "lmkdir \$SR 755" && \
- echo "lmkdir \$SR/proxy 750" && \
- echo "lmkdir \$SR/logs 750" && \
- echo "lcopy bindist/man \$SR/man 755 644" && \
- echo "lcopy bindist/libexec \$SR/libexec 750 644" && \
- echo "lcopy bindist/include \$SR/include 755 644" && \
- echo "lcopy bindist/icons \$SR/icons 755 644" && \
- echo "lcopy bindist/cgi-bin \$SR/cgi-bin 750 750" && \
- echo "lcopy bindist/bin \$SR/bin 750 750" && \
- echo "if [ -d \$SR/conf ]" && \
- echo "then" && \
- echo " echo \"[Preserving existing configuration files.]\"" && \
- echo " cp bindist/conf/*.default \$SR/conf/" && \
- echo "else" && \
- echo " lcopy bindist/conf \$SR/conf 750 640" && \
- echo "fi" && \
- echo "if [ -d \$SR/htdocs ]" && \
- echo "then" && \
- echo " echo \"[Preserving existing htdocs directory.]\"" && \
- echo "else" && \
- echo " lcopy bindist/htdocs \$SR/htdocs 755 644" && \
- echo "fi" && \
- echo " " && \
- echo "sed -e \"s;^#!/.*;#!\$PERL;\" -e \"s;\@prefix\@;\$SR;\" -e \"s;\@sbindir\@;\$SR/bin;\" \\" && \
- echo " -e \"s;\@libexecdir\@;\$SR/libexec;\" -e \"s;\@includedir\@;\$SR/include;\" \\" && \
- echo " -e \"s;\@sysconfdir\@;\$SR/conf;\" bindist/bin/apxs > \$SR/bin/apxs" && \
- echo "sed -e \"s;^#!/.*;#!\$PERL;\" bindist/bin/dbmmanage > \$SR/bin/dbmmanage" && \
- echo "sed -e \"s%/usr/local/apache%\$SR%\" \$SR/conf/httpd.conf.default > \$SR/conf/httpd.conf" && \
- echo "sed -e \"s%PIDFILE=%PIDFILE=\$SR/%\" -e \"s%HTTPD=%HTTPD=\\\"\$SR/%\" -e \"s%httpd\$%httpd -d \$SR -R \$SR/libexec\\\"%\" bindist/bin/apachectl > \$SR/bin/apachectl" && \
- echo " " && \
- echo "echo \"Ready.\"" && \
- echo "echo \" +--------------------------------------------------------+\"" && \
- echo "echo \" | You now have successfully installed the Apache $VER |\"" && \
- echo "echo \" | HTTP server. To verify that Apache actually works |\"" && \
- echo "echo \" | correctly you should first check the (initially |\"" && \
- echo "echo \" | created or preserved) configuration files: |\"" && \
- echo "echo \" | |\"" && \
- echo "echo \" | \$SR/conf/httpd.conf\"" && \
- echo "echo \" | |\"" && \
- echo "echo \" | You should then be able to immediately fire up |\"" && \
- echo "echo \" | Apache the first time by running: |\"" && \
- echo "echo \" | |\"" && \
- echo "echo \" | \$SR/bin/apachectl start \"" &&\
- echo "echo \" | |\"" && \
- echo "echo \" | Thanks for using Apache. The Apache Group |\"" && \
- echo "echo \" | http://www.apache.org/ |\"" && \
- echo "echo \" +--------------------------------------------------------+\"" && \
- echo "echo \" \"" \
-) > install-bindist.sh
-chmod 755 install-bindist.sh
-
-sed -e "s%\"htdocs%\"/usr/local/apache/htdocs%" \
- -e "s%\"icons%\"/usr/local/apache/icons%" \
- -e "s%\"cgi-bin%\"/usr/local/apache/cgi-bin%" \
- -e "s%\"proxy%\"/usr/local/apache/proxy%" \
- -e "s%^ServerAdmin.*%ServerAdmin you@your.address%" \
- -e "s%#ServerName.*%#ServerName localhost%" \
- -e "s%Port 8080%Port 80%" \
- bindist/conf/httpd.conf.default > bindist/conf/httpd.conf
-cp bindist/conf/httpd.conf bindist/conf/httpd.conf.default
-
-echo "Creating distribution archive and readme file..."
-
-if [ ".`grep -i error build.log > /dev/null`" != . ]
-then
- echo "ERROR: Failed to build Apache. See \"build.log\" for details."
- exit 1;
-else
- if [ "x$GTAR" != "x" ]
- then
- $GTAR -zcf ../apache_$VER-$OS.tar.gz -C .. apache_$VER
- else
- if [ "x$TAR" != "x" ]
- then
- case "x$OS" in
- x*390*) $TAR -cfU ../apache_$VER-$OS.tar -C .. apache_$VER;;
- *) $TAR -cf ../apache_$VER-$OS.tar -C .. apache_$VER;;
- esac
- if [ "x$GZIP" != "x" ]
- then
- $GZIP ../apache_$VER-$OS.tar
- fi
- else
- echo "ERROR: Could not find a 'tar' program!"
- echo " Please execute the following commands manually:"
- echo " tar -cf ../apache_$VER-$OS.tar ."
- echo " gzip ../apache_$VER-$OS.tar"
- fi
- fi
-
- if [ -f ../apache_$VER-$OS.tar.gz ] && [ -f ../apache_$VER-$OS.README ]
- then
- echo "Ready."
- echo "You can find the binary archive (apache_$VER-$OS.tar.gz)"
- echo "and the readme file (apache_$VER-$OS.README) in the"
- echo "parent directory."
- exit 0;
- else
- exit 1;
- fi
-fi
diff --git a/docs/docroot/apache_pb.gif b/docs/docroot/apache_pb.gif
deleted file mode 100644
index 3a1c139fc4..0000000000
--- a/docs/docroot/apache_pb.gif
+++ /dev/null
Binary files differ
diff --git a/docs/manual/bind.html.en b/docs/manual/bind.html.en
deleted file mode 100644
index 75bacbb253..0000000000
--- a/docs/manual/bind.html.en
+++ /dev/null
@@ -1,135 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<HTML><HEAD>
-<TITLE>Setting which addresses and ports Apache uses</TITLE>
-</HEAD>
-
-<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
-<BODY
- BGCOLOR="#FFFFFF"
- TEXT="#000000"
- LINK="#0000FF"
- VLINK="#000080"
- ALINK="#FF0000"
->
-<!--#include virtual="header.html" -->
-<H1 ALIGN="CENTER">Setting which addresses and ports Apache uses</H1>
-
-<HR>
-
-When Apache starts, it connects to some port and address on the
-local machine and waits for incoming requests. By default, it
-listens to all addresses on the machine, and to the port
-as specified by the <TT>Port</TT> directive in the server configuration.
-However, it can be told to listen to more the one port, or to listen
-to only selected addresses, or a combination. This is often combined
-with the Virtual Host feature which determines how Apache
-responds to different IP addresses, hostnames and ports.<P>
-
-There are two directives used to restrict or specify which addresses
-and ports Apache listens to.
-
-<UL>
-<LI><A HREF="#bindaddress">BindAddress</A> is used to restrict the server to
- listening to
- a single address, and can be used to permit multiple Apache servers
- on the same machine listening to different IP addresses.
-<LI><A HREF="#listen">Listen</A> can be used to make a single Apache server
- listen
- to more than one address and/or port.
-</UL>
-
-<H3><A NAME="bindaddress">BindAddress</A></H3>
-<A
- HREF="mod/directive-dict.html#Syntax"
- REL="Help"
-><STRONG>Syntax:</STRONG></A> BindAddress <EM>[ * | IP-address
- | hostname ]</EM><BR>
-<A
- HREF="mod/directive-dict.html#Default"
- REL="Help"
-><STRONG>Default:</STRONG></A> <CODE>BindAddress *</CODE><BR>
-<A
- HREF="mod/directive-dict.html#Context"
- REL="Help"
-><STRONG>Context:</STRONG></A> server config<BR>
-<A
- HREF="mod/directive-dict.html#Status"
- REL="Help"
-><STRONG>Status:</STRONG></A> Core<P>
-
-Makes the server listen to just the specified address. If the argument
-is *, the server listens to all addresses. The port listened to
-is set with the <TT>Port</TT> directive. Only one BindAddress
-should be used.
-
-<H3><A NAME="listen">Listen</A></H3>
-<A
- HREF="mod/directive-dict.html#Syntax"
- REL="Help"
-><STRONG>Syntax:</STRONG></A> Listen <EM>[ port | IP-address:port ]</EM><BR>
-<A
- HREF="mod/directive-dict.html#Default"
- REL="Help"
-><STRONG>Default:</STRONG></A> <CODE>none</CODE><BR>
-<A
- HREF="mod/directive-dict.html#Context"
- REL="Help"
-><STRONG>Context:</STRONG></A> server config<BR>
-<A
- HREF="mod/directive-dict.html#Status"
- REL="Help"
-><STRONG>Status:</STRONG></A> Core<P>
-
-<TT>Listen</TT> can be used instead of <TT>BindAddress</TT> and
-<TT>Port</TT>. It tells the server to accept incoming requests on the
-specified port or address-and-port combination. If the first format is
-used, with a port number only, the server listens to the given port on
-all interfaces, instead of the port given by the <TT>Port</TT>
-directive. If an IP address is given as well as a port, the server
-will listen on the given port and interface. <P> Multiple Listen
-directives may be used to specify a number of addresses and ports to
-listen to. The server will respond to requests from any of the listed
-addresses and ports.<P>
-
-For example, to make the server accept connections on both port
-80 and port 8000, use:
-<PRE>
- Listen 80
- Listen 8000
-</PRE>
-
-To make the server accept connections on two specified
-interfaces and port numbers, use
-<PRE>
- Listen 192.170.2.1:80
- Listen 192.170.2.5:8000
-</PRE>
-
-<H2>How this works with Virtual Hosts</H2>
-
-BindAddress and Listen do not implement Virtual Hosts. They tell the
-main server what addresses and ports to listen to. If no
-&lt;VirtualHost&gt; directives are used, the server will behave the
-same for all accepted requests. However, &lt;VirtualHost&gt; can be
-used to specify a different behavior for one or more of the addresses
-and ports. To implement a VirtualHost, the server must first be told
-to listen to the address and port to be used. Then a
-&lt;VirtualHost&gt; section should be created for a specified address
-and port to set the behavior of this virtual host. Note that if the
-&lt;VirtualHost&gt; is set for an address and port that the server is
-not listening to, it cannot be accessed.
-
-<H2>See also</H2>
-
-See also the documentation on
-<A HREF="vhosts/index.html">Virtual Hosts</A>,
-<A HREF="mod/core.html#bindaddress">BindAddress directive</A>,
-<A HREF="mod/core.html#port">Port directive</A>,
-<A HREF="dns-caveats.html">DNS Issues</A>
-and
-<A HREF="mod/core.html#virtualhost">&lt;VirtualHost&gt; section</A>.
-
-<!--#include virtual="footer.html" -->
-</BODY>
-</HTML>
-
diff --git a/docs/manual/cgi_path.html.en b/docs/manual/cgi_path.html.en
deleted file mode 100644
index 2b7bd963b1..0000000000
--- a/docs/manual/cgi_path.html.en
+++ /dev/null
@@ -1,93 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<HTML><HEAD>
-<TITLE>PATH_INFO Changes in the CGI Environment</TITLE>
-</HEAD>
-
-<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
-<BODY
- BGCOLOR="#FFFFFF"
- TEXT="#000000"
- LINK="#0000FF"
- VLINK="#000080"
- ALINK="#FF0000"
->
-<!--#include virtual="header.html" -->
-<H1 ALIGN="CENTER">PATH_INFO Changes in the CGI Environment</H1>
-
-<HR>
-
-<H2><A NAME="over">Overview</A></H2>
-
-<P>As implemented in Apache 1.1.1 and earlier versions, the method
-Apache used to create PATH_INFO in the CGI environment was
-counterintuitive, and could result in crashes in certain cases. In
-Apache 1.2 and beyond, this behavior has changed. Although this
-results in some compatibility problems with certain legacy CGI
-applications, the Apache 1.2 behavior is still compatible with the
-CGI/1.1 specification, and CGI scripts can be easily modified (<A
-HREF="#compat">see below</A>).
-
-<H2><A NAME="prob">The Problem</A></H2>
-
-<P>Apache 1.1.1 and earlier implemented the PATH_INFO and SCRIPT_NAME
-environment variables by looking at the filename, not the URL. While
-this resulted in the correct values in many cases, when the filesystem
-path was overloaded to contain path information, it could result in
-errant behavior. For example, if the following appeared in a config
-file:
-<PRE>
- Alias /cgi-ralph /usr/local/httpd/cgi-bin/user.cgi/ralph
-</PRE>
-<P>In this case, <CODE>user.cgi</CODE> is the CGI script, the "/ralph"
-is information to be passed onto the CGI. If this configuration was in
-place, and a request came for "<CODE>/cgi-ralph/script/</CODE>", the
-code would set PATH_INFO to "<CODE>/ralph/script</CODE>", and
-SCRIPT_NAME to "<CODE>/cgi-</CODE>". Obviously, the latter is
-incorrect. In certain cases, this could even cause the server to
-crash.</P>
-
-<H2><A NAME="solution">The Solution</A></H2>
-
-<P>Apache 1.2 and later now determine SCRIPT_NAME and PATH_INFO by
-looking directly at the URL, and determining how much of the URL is
-client-modifiable, and setting PATH_INFO to it. To use the above
-example, PATH_INFO would be set to "<CODE>/script</CODE>", and
-SCRIPT_NAME to "<CODE>/cgi-ralph</CODE>". This makes sense and results
-in no server behavior problems. It also permits the script to be
-guaranteed that
-"<CODE>http://$SERVER_NAME:$SERVER_PORT$SCRIPT_NAME$PATH_INFO</CODE>"
-will always be an accessible URL that points to the current script,
-something which was not necessarily true with previous versions of
-Apache.
-
-<P>However, the "<CODE>/ralph</CODE>"
-information from the <CODE>Alias</CODE> directive is lost. This is
-unfortunate, but we feel that using the filesystem to pass along this
-sort of information is not a recommended method, and a script making
-use of it "deserves" not to work. Apache 1.2b3 and later, however, do
-provide <A HREF="#compat">a workaround.</A>
-
-<H2><A NAME="compat">Compatibility with Previous Servers</A></H2>
-
-<P>It may be necessary for a script that was designed for earlier
-versions of Apache or other servers to need the information that the
-old PATH_INFO variable provided. For this purpose, Apache 1.2 (1.2b3
-and later) sets an additional variable, FILEPATH_INFO. This
-environment variable contains the value that PATH_INFO would have had
-with Apache 1.1.1.</P>
-
-<P>A script that wishes to work with both Apache 1.2 and earlier
-versions can simply test for the existence of FILEPATH_INFO, and use
-it if available. Otherwise, it can use PATH_INFO. For example, in
-Perl, one might use:
-<PRE>
- $path_info = $ENV{'FILEPATH_INFO'} || $ENV{'PATH_INFO'};
-</PRE>
-
-<P>By doing this, a script can work with all servers supporting the
-CGI/1.1 specification, including all versions of Apache.</P>
-
-<!--#include virtual="footer.html" -->
-</BODY>
-</HTML>
-
diff --git a/docs/manual/content-negotiation.html.en b/docs/manual/content-negotiation.html.en
deleted file mode 100644
index 7bfaee5afa..0000000000
--- a/docs/manual/content-negotiation.html.en
+++ /dev/null
@@ -1,588 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<HTML>
-<HEAD>
-<TITLE>Apache Content Negotiation</TITLE>
-</HEAD>
-
-<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
-<BODY
- BGCOLOR="#FFFFFF"
- TEXT="#000000"
- LINK="#0000FF"
- VLINK="#000080"
- ALINK="#FF0000"
->
-<!--#include virtual="header.html" -->
-<H1 ALIGN="CENTER">Content Negotiation</H1>
-
-<P>
-Apache's support for content negotiation has been updated to meet the
-HTTP/1.1 specification. It can choose the best representation of a
-resource based on the browser-supplied preferences for media type,
-languages, character set and encoding. It is also implements a
-couple of features to give more intelligent handling of requests from
-browsers which send incomplete negotiation information. <P>
-
-Content negotiation is provided by the
-<A HREF="mod/mod_negotiation.html">mod_negotiation</A> module,
-which is compiled in by default.
-
-<HR>
-
-<H2>About Content Negotiation</H2>
-
-<P>
-A resource may be available in several different representations. For
-example, it might be available in different languages or different
-media types, or a combination. One way of selecting the most
-appropriate choice is to give the user an index page, and let them
-select. However it is often possible for the server to choose
-automatically. This works because browsers can send as part of each
-request information about what representations they prefer. For
-example, a browser could indicate that it would like to see
-information in French, if possible, else English will do. Browsers
-indicate their preferences by headers in the request. To request only
-French representations, the browser would send
-
-<PRE>
- Accept-Language: fr
-</PRE>
-
-<P>
-Note that this preference will only be applied when there is a choice
-of representations and they vary by language.
-<P>
-
-As an example of a more complex request, this browser has been
-configured to accept French and English, but prefer French, and to
-accept various media types, preferring HTML over plain text or other
-text types, and preferring GIF or JPEG over other media types, but also
-allowing any other media type as a last resort:
-
-<PRE>
- Accept-Language: fr; q=1.0, en; q=0.5
- Accept: text/html; q=1.0, text/*; q=0.8, image/gif; q=0.6,
- image/jpeg; q=0.6, image/*; q=0.5, */*; q=0.1
-</PRE>
-
-Apache 1.2 supports 'server driven' content negotiation, as defined in
-the HTTP/1.1 specification. It fully supports the Accept,
-Accept-Language, Accept-Charset and Accept-Encoding request headers.
-Apache 1.3.4 also supports 'transparent' content negotiation, which is
-an experimental negotiation protocol defined in RFC 2295 and RFC 2296.
-It does not offer support for 'feature negotiation' as defined in
-these RFCs.
-<P>
-
-A <STRONG>resource</STRONG> is a conceptual entity identified by a URI
-(RFC 2396). An HTTP server like Apache provides access to
-<STRONG>representations</STRONG> of the resource(s) within its namespace,
-with each representation in the form of a sequence of bytes with a
-defined media type, character set, encoding, etc. Each resource may be
-associated with zero, one, or more than one representation
-at any given time. If multiple representations are available,
-the resource is referred to as <STRONG>negotiable</STRONG> and each of its
-representations is termed a <STRONG>variant</STRONG>. The ways in which the
-variants for a negotiable resource vary are called the
-<STRONG>dimensions</STRONG> of negotiation.
-
-<H2>Negotiation in Apache</H2>
-
-<P>
-In order to negotiate a resource, the server needs to be given
-information about each of the variants. This is done in one of two
-ways:
-
-<UL>
- <LI> Using a type map (<EM>i.e.</EM>, a <CODE>*.var</CODE> file) which
- names the files containing the variants explicitly, or
- <LI> Using a 'MultiViews' search, where the server does an implicit
- filename pattern match and chooses from among the results.
-</UL>
-
-<H3>Using a type-map file</H3>
-
-<P>
-A type map is a document which is associated with the handler
-named <CODE>type-map</CODE> (or, for backwards-compatibility with
-older Apache configurations, the mime type
-<CODE>application/x-type-map</CODE>). Note that to use this feature,
-you must have a handler set in the configuration that defines a
-file suffix as <CODE>type-map</CODE>; this is best done with a
-
-<PRE>
- AddHandler type-map var
-</PRE>
-
-in the server configuration file. See the comments in the sample config
-file for more details. <P>
-
-Type map files have an entry for each available variant; these entries
-consist of contiguous HTTP-format header lines. Entries for
-different variants are separated by blank lines. Blank lines are
-illegal within an entry. It is conventional to begin a map file with
-an entry for the combined entity as a whole (although this
-is not required, and if present will be ignored). An example
-map file is:
-
-<PRE>
- URI: foo
-
- URI: foo.en.html
- Content-type: text/html
- Content-language: en
-
- URI: foo.fr.de.html
- Content-type: text/html;charset=iso-8859-2
- Content-language: fr, de
-</PRE>
-
-If the variants have different source qualities, that may be indicated
-by the "qs" parameter to the media type, as in this picture (available
-as jpeg, gif, or ASCII-art):
-
-<PRE>
- URI: foo
-
- URI: foo.jpeg
- Content-type: image/jpeg; qs=0.8
-
- URI: foo.gif
- Content-type: image/gif; qs=0.5
-
- URI: foo.txt
- Content-type: text/plain; qs=0.01
-</PRE>
-<P>
-
-qs values can vary in the range 0.000 to 1.000. Note that any variant with
-a qs value of 0.000 will never be chosen. Variants with no 'qs'
-parameter value are given a qs factor of 1.0. The qs parameter indicates
-the relative 'quality' of this variant compared to the other available
-variants, independent of the client's capabilities. For example, a jpeg
-file is usually of higher source quality than an ascii file if it is
-attempting to represent a photograph. However, if the resource being
-represented is an original ascii art, then an ascii representation would
-have a higher source quality than a jpeg representation. A qs value
-is therefore specific to a given variant depending on the nature of
-the resource it represents.
-
-<P>
-The full list of headers recognized is:
-
-<DL>
- <DT> <CODE>URI:</CODE>
- <DD> uri of the file containing the variant (of the given media
- type, encoded with the given content encoding). These are
- interpreted as URLs relative to the map file; they must be on
- the same server (!), and they must refer to files to which the
- client would be granted access if they were to be requested
- directly.
- <DT> <CODE>Content-Type:</CODE>
- <DD> media type --- charset, level and "qs" parameters may be given. These
- are often referred to as MIME types; typical media types are
- <CODE>image/gif</CODE>, <CODE>text/plain</CODE>, or
- <CODE>text/html;&nbsp;level=3</CODE>.
- <DT> <CODE>Content-Language:</CODE>
- <DD> The languages of the variant, specified as an Internet standard
- language tag from RFC 1766 (<EM>e.g.</EM>, <CODE>en</CODE> for English,
- <CODE>kr</CODE> for Korean, <EM>etc.</EM>).
- <DT> <CODE>Content-Encoding:</CODE>
- <DD> If the file is compressed, or otherwise encoded, rather than
- containing the actual raw data, this says how that was done.
- Apache only recognizes encodings that are defined by an
- <A HREF="mod/mod_mime.html#addencoding">AddEncoding</A> directive.
- This normally includes the encodings <CODE>x-compress</CODE>
- for compress'd files, and <CODE>x-gzip</CODE> for gzip'd files.
- The <CODE>x-</CODE> prefix is ignored for encoding comparisons.
- <DT> <CODE>Content-Length:</CODE>
- <DD> The size of the file. Specifying content
- lengths in the type-map allows the server to compare file sizes
- without checking the actual files.
- <DT> <CODE>Description:</CODE>
- <DD> A human-readable textual description of the variant. If Apache cannot
- find any appropriate variant to return, it will return an error
- response which lists all available variants instead. Such a variant
- list will include the human-readable variant descriptions.
-</DL>
-
-<H3>Multiviews</H3>
-
-<P>
-<CODE>MultiViews</CODE> is a per-directory option, meaning it can be set with
-an <CODE>Options</CODE> directive within a <CODE>&lt;Directory&gt;</CODE>,
-<CODE>&lt;Location&gt;</CODE> or <CODE>&lt;Files&gt;</CODE>
-section in <CODE>access.conf</CODE>, or (if <CODE>AllowOverride</CODE>
-is properly set) in <CODE>.htaccess</CODE> files. Note that
-<CODE>Options All</CODE> does not set <CODE>MultiViews</CODE>; you
-have to ask for it by name.
-
-<P>
-The effect of <CODE>MultiViews</CODE> is as follows: if the server
-receives a request for <CODE>/some/dir/foo</CODE>, if
-<CODE>/some/dir</CODE> has <CODE>MultiViews</CODE> enabled, and
-<CODE>/some/dir/foo</CODE> does <EM>not</EM> exist, then the server reads the
-directory looking for files named foo.*, and effectively fakes up a
-type map which names all those files, assigning them the same media
-types and content-encodings it would have if the client had asked for
-one of them by name. It then chooses the best match to the client's
-requirements.
-
-<P>
-<CODE>MultiViews</CODE> may also apply to searches for the file named by the
-<CODE>DirectoryIndex</CODE> directive, if the server is trying to
-index a directory. If the configuration files specify
-
-<PRE>
- DirectoryIndex index
-</PRE>
-
-then the server will arbitrate between <CODE>index.html</CODE>
-and <CODE>index.html3</CODE> if both are present. If neither are
-present, and <CODE>index.cgi</CODE> is there, the server will run it.
-
-<P>
-If one of the files found when reading the directive is a CGI script,
-it's not obvious what should happen. The code gives that case
-special treatment --- if the request was a POST, or a GET with
-QUERY_ARGS or PATH_INFO, the script is given an extremely high quality
-rating, and generally invoked; otherwise it is given an extremely low
-quality rating, which generally causes one of the other views (if any)
-to be retrieved.
-
-<H2>The Negotiation Methods</H2>
-
-After Apache has obtained a list of the variants for a given resource,
-either from a type-map file or from the filenames in the directory, it
-invokes one of two methods to decide on the 'best' variant to
-return, if any. It is not necessary to know any of the details of how
-negotiation actually takes place in order to use Apache's content
-negotiation features. However the rest of this document explains the
-methods used for those interested.
-<P>
-
-There are two negotiation methods:
-
-<OL>
-
-<LI><STRONG>Server driven negotiation with the Apache
-algorithm</STRONG> is used in the normal case. The Apache algorithm is
-explained in more detail below. When this algorithm is used, Apache
-can sometimes 'fiddle' the quality factor of a particular dimension to
-achieve a better result. The ways Apache can fiddle quality factors is
-explained in more detail below.
-
-<LI><STRONG>Transparent content negotiation</STRONG> is used when the
-browser specifically requests this through the mechanism defined in RFC
-2295. This negotiation method gives the browser full control over
-deciding on the 'best' variant, the result is therefore dependent on
-the specific algorithms used by the browser. As part of the
-transparent negotiation process, the browser can ask Apache to run the
-'remote variant selection algorithm' defined in RFC 2296. </UL>
-
-
-<H3>Dimensions of Negotiation</H3>
-
-<TABLE>
-<TR valign="top">
-<TH>Dimension
-<TH>Notes
-<TR valign="top">
-<TD>Media Type
-<TD>Browser indicates preferences with the Accept header field. Each item
-can have an associated quality factor. Variant description can also
-have a quality factor (the "qs" parameter).
-<TR valign="top">
-<TD>Language
-<TD>Browser indicates preferences with the Accept-Language header field.
-Each item can have a quality factor. Variants can be associated with none, one
-or more than one language.
-<TR valign="top">
-<TD>Encoding
-<TD>Browser indicates preference with the Accept-Encoding header field.
-Each item can have a quality factor.
-<TR valign="top">
-<TD>Charset
-<TD>Browser indicates preference with the Accept-Charset header field.
-Each item can have a quality factor.
-Variants can indicate a charset as a parameter of the media type.
-</TABLE>
-
-<H3>Apache Negotiation Algorithm</H3>
-
-<P>
-Apache can use the following algorithm to select the 'best' variant
-(if any) to return to the browser. This algorithm is not
-further configurable. It operates as follows:
-
-<OL>
-<LI>First, for each dimension of the negotiation, check the appropriate
-<EM>Accept*</EM> header field and assign a quality to each
-variant. If the <EM>Accept*</EM> header for any dimension implies that this
-variant is not acceptable, eliminate it. If no variants remain, go
-to step 4.
-
-<LI>Select the 'best' variant by a process of elimination. Each of the
-following tests is applied in order. Any variants not selected at each
-test are eliminated. After each test, if only one variant remains,
-select it as the best match and proceed to step 3. If more than one
-variant remains, move on to the next test.
-
-<OL>
-<LI>Multiply the quality factor from the Accept header with the
- quality-of-source factor for this variant's media type, and select
- the variants with the highest value.
-
-<LI>Select the variants with the highest language quality factor.
-
-<LI>Select the variants with the best language match, using either the
- order of languages in the Accept-Language header (if present), or else
- else the order of languages in the <CODE>LanguagePriority</CODE>
- directive (if present).
-
-<LI>Select the variants with the highest 'level' media parameter
- (used to give the version of text/html media types).
-
-<LI>Select variants with the best charset media parameters,
- as given on the Accept-Charset header line. Charset ISO-8859-1
- is acceptable unless explicitly excluded. Variants with a
- <CODE>text/*</CODE> media type but not explicitly associated
- with a particular charset are assumed to be in ISO-8859-1.
-
-<LI>Select those variants which have associated
- charset media parameters that are <EM>not</EM> ISO-8859-1.
- If there are no such variants, select all variants instead.
-
-<LI>Select the variants with the best encoding. If there are
- variants with an encoding that is acceptable to the user-agent,
- select only these variants. Otherwise if there is a mix of encoded
- and non-encoded variants, select only the unencoded variants.
- If either all variants are encoded or all variants are not encoded,
- select all variants.
-
-<LI>Select the variants with the smallest content length.
-
-<LI>Select the first variant of those remaining. This will be either the
- first listed in the type-map file, or when variants are read from
- the directory, the one whose file name comes first when sorted using
- ASCII code order.
-
-</OL>
-
-<LI>The algorithm has now selected one 'best' variant, so return
- it as the response. The HTTP response header Vary is set to indicate the
- dimensions of negotiation (browsers and caches can use this
- information when caching the resource). End.
-
-<LI>To get here means no variant was selected (because none are acceptable
- to the browser). Return a 406 status (meaning "No acceptable representation")
- with a response body consisting of an HTML document listing the
- available variants. Also set the HTTP Vary header to indicate the
- dimensions of variance.
-
-</OL>
-
-<H2><A NAME="better">Fiddling with Quality Values</A></H2>
-
-<P>
-Apache sometimes changes the quality values from what would be
-expected by a strict interpretation of the Apache negotiation
-algorithm above. This is to get a better result from the algorithm for
-browsers which do not send full or accurate information. Some of the
-most popular browsers send Accept header information which would
-otherwise result in the selection of the wrong variant in many
-cases. If a browser sends full and correct information these fiddles
-will not be applied.
-<P>
-
-<H3>Media Types and Wildcards</H3>
-
-<P>
-The Accept: request header indicates preferences for media types. It
-can also include 'wildcard' media types, such as "image/*" or "*/*"
-where the * matches any string. So a request including:
-<PRE>
- Accept: image/*, */*
-</PRE>
-
-would indicate that any type starting "image/" is acceptable,
-as is any other type (so the first "image/*" is redundant). Some
-browsers routinely send wildcards in addition to explicit types they
-can handle. For example:
-<PRE>
- Accept: text/html, text/plain, image/gif, image/jpeg, */*
-</PRE>
-
-The intention of this is to indicate that the explicitly
-listed types are preferred, but if a different representation is
-available, that is ok too. However under the basic algorithm, as given
-above, the */* wildcard has exactly equal preference to all the other
-types, so they are not being preferred. The browser should really have
-sent a request with a lower quality (preference) value for *.*, such
-as:
-<PRE>
- Accept: text/html, text/plain, image/gif, image/jpeg, */*; q=0.01
-</PRE>
-
-The explicit types have no quality factor, so they default to a
-preference of 1.0 (the highest). The wildcard */* is given
-a low preference of 0.01, so other types will only be returned if
-no variant matches an explicitly listed type.
-<P>
-
-If the Accept: header contains <EM>no</EM> q factors at all, Apache sets
-the q value of "*/*", if present, to 0.01 to emulate the desired
-behavior. It also sets the q value of wildcards of the format
-"type/*" to 0.02 (so these are preferred over matches against
-"*/*". If any media type on the Accept: header contains a q factor,
-these special values are <EM>not</EM> applied, so requests from browsers
-which send the correct information to start with work as expected.
-
-<H3>Variants with no Language</H3>
-
-<P>
-If some of the variants for a particular resource have a language
-attribute, and some do not, those variants with no language
-are given a very low language quality factor of 0.001.<P>
-
-The reason for setting this language quality factor for
-variant with no language to a very low value is to allow
-for a default variant which can be supplied if none of the
-other variants match the browser's language preferences.
-
-For example, consider the situation with three variants:
-
-<UL>
-<LI>foo.en.html, language en
-<LI>foo.fr.html, language en
-<LI>foo.html, no language
-</UL>
-
-<P>
-The meaning of a variant with no language is that it is
-always acceptable to the browser. If the request Accept-Language
-header includes either en or fr (or both) one of foo.en.html
-or foo.fr.html will be returned. If the browser does not list
-either en or fr as acceptable, foo.html will be returned instead.
-
-<H2>Extensions to Transparent Content Negotiation</H2>
-
-Apache extends the transparent content negotiation protocol (RFC 2295)
-as follows. A new <CODE> {encoding ..}</CODE> element is used in
-variant lists to label variants which are available with a specific
-content-encoding only. The implementation of the
-RVSA/1.0 algorithm (RFC 2296) is extended to recognize encoded
-variants in the list, and to use them as candidate variants whenever
-their encodings are acceptable according to the Accept-Encoding
-request header. The RVSA/1.0 implementation does not round computed
-quality factors to 5 decimal places before choosing the best variant.
-
-<H2>Note on hyperlinks and naming conventions</H2>
-
-<P>
-If you are using language negotiation you can choose between
-different naming conventions, because files can have more than one
-extension, and the order of the extensions is normally irrelevant
-(see <A HREF="mod/mod_mime.html">mod_mime</A> documentation for details).
-<P>
-A typical file has a MIME-type extension (<EM>e.g.</EM>, <SAMP>html</SAMP>),
-maybe an encoding extension (<EM>e.g.</EM>, <SAMP>gz</SAMP>), and of course a
-language extension (<EM>e.g.</EM>, <SAMP>en</SAMP>) when we have different
-language variants of this file.
-
-<P>
-Examples:
-<UL>
-<LI>foo.en.html
-<LI>foo.html.en
-<LI>foo.en.html.gz
-</UL>
-
-<P>
-Here some more examples of filenames together with valid and invalid
-hyperlinks:
-</P>
-
-<TABLE BORDER=1 CELLPADDING=8 CELLSPACING=0>
-<TR>
- <TH>Filename</TH>
- <TH>Valid hyperlink</TH>
- <TH>Invalid hyperlink</TH>
-</TR>
-<TR>
- <TD><EM>foo.html.en</EM></TD>
- <TD>foo<BR>
- foo.html</TD>
- <TD>-</TD>
-</TR>
-<TR>
- <TD><EM>foo.en.html</EM></TD>
- <TD>foo</TD>
- <TD>foo.html</TD>
-</TR>
-<TR>
- <TD><EM>foo.html.en.gz</EM></TD>
- <TD>foo<BR>
- foo.html</TD>
- <TD>foo.gz<BR>
- foo.html.gz</TD>
-</TR>
-<TR>
- <TD><EM>foo.en.html.gz</EM></TD>
- <TD>foo</TD>
- <TD>foo.html<BR>
- foo.html.gz<BR>
- foo.gz</TD>
-</TR>
-<TR>
- <TD><EM>foo.gz.html.en</EM></TD>
- <TD>foo<BR>
- foo.gz<BR>
- foo.gz.html</TD>
- <TD>foo.html</TD>
-</TR>
-<TR>
- <TD><EM>foo.html.gz.en</EM></TD>
- <TD>foo<BR>
- foo.html<BR>
- foo.html.gz</TD>
- <TD>foo.gz</TD>
-</TR>
-</TABLE>
-
-<P>
-Looking at the table above you will notice that it is always possible to
-use the name without any extensions in an hyperlink (<EM>e.g.</EM>, <SAMP>foo</SAMP>).
-The advantage is that you can hide the actual type of a
-document rsp. file and can change it later, <EM>e.g.</EM>, from <SAMP>html</SAMP>
-to <SAMP>shtml</SAMP> or <SAMP>cgi</SAMP> without changing any
-hyperlink references.
-
-<P>
-If you want to continue to use a MIME-type in your hyperlinks (<EM>e.g.</EM>
-<SAMP>foo.html</SAMP>) the language extension (including an encoding extension
-if there is one) must be on the right hand side of the MIME-type extension
-(<EM>e.g.</EM>, <SAMP>foo.html.en</SAMP>).
-
-
-<H2>Note on Caching</H2>
-
-<P>
-When a cache stores a representation, it associates it with the request URL.
-The next time that URL is requested, the cache can use the stored
-representation. But, if the resource is negotiable at the server,
-this might result in only the first requested variant being cached and
-subsequent cache hits might return the wrong response. To prevent this,
-Apache normally marks all responses that are returned after content negotiation
-as non-cacheable by HTTP/1.0 clients. Apache also supports the HTTP/1.1
-protocol features to allow caching of negotiated responses. <P>
-
-For requests which come from a HTTP/1.0 compliant client (either a
-browser or a cache), the directive <TT>CacheNegotiatedDocs</TT> can be
-used to allow caching of responses which were subject to negotiation.
-This directive can be given in the server config or virtual host, and
-takes no arguments. It has no effect on requests from HTTP/1.1 clients.
-
-<!--#include virtual="footer.html" -->
-</BODY>
-</HTML>
diff --git a/docs/manual/custom-error.html.en b/docs/manual/custom-error.html.en
deleted file mode 100644
index 09604ea972..0000000000
--- a/docs/manual/custom-error.html.en
+++ /dev/null
@@ -1,177 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<HTML>
-<HEAD>
-<TITLE>Custom error responses</TITLE>
-</HEAD>
-
-<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
-<BODY
- BGCOLOR="#FFFFFF"
- TEXT="#000000"
- LINK="#0000FF"
- VLINK="#000080"
- ALINK="#FF0000"
->
-<!--#include virtual="header.html" -->
-<H1 ALIGN="CENTER">Custom error responses</H1>
-
-<DL>
-
-<DT>Purpose
-
- <DD>Additional functionality. Allows webmasters to configure the response of
- Apache to some error or problem.
-
- <P>Customizable responses can be defined to be activated in the
- event of a server detected error or problem.
-
- <P>e.g. if a script crashes and produces a "500 Server Error"
- response, then this response can be replaced with either some
- friendlier text or by a redirection to another URL (local or
- external).
- <P>
-
-<DT>Old behavior
-
- <DD>NCSA httpd 1.3 would return some boring old error/problem message
- which would often be meaningless to the user, and would provide no
- means of logging the symptoms which caused it.<BR>
-
- <P>
-
-<DT>New behavior
-
- <DD>The server can be asked to;
- <OL>
- <LI>Display some other text, instead of the NCSA hard coded messages, or
- <LI>redirect to a local URL, or
- <LI>redirect to an external URL.
- </OL>
-
- <P>Redirecting to another URL can be useful, but only if some information
- can be passed which can then be used to explain and/or log the
- error/problem
- more clearly.
-
- <P>To achieve this, Apache will define new CGI-like environment
- variables, <EM>e.g.</EM>
-
- <BLOCKQUOTE><CODE>
-REDIRECT_HTTP_ACCEPT=*/*, image/gif, image/x-xbitmap, image/jpeg <BR>
-REDIRECT_HTTP_USER_AGENT=Mozilla/1.1b2 (X11; I; HP-UX A.09.05 9000/712) <BR>
-REDIRECT_PATH=.:/bin:/usr/local/bin:/etc <BR>
-REDIRECT_QUERY_STRING= <BR>
-REDIRECT_REMOTE_ADDR=121.345.78.123 <BR>
-REDIRECT_REMOTE_HOST=ooh.ahhh.com <BR>
-REDIRECT_SERVER_NAME=crash.bang.edu <BR>
-REDIRECT_SERVER_PORT=80 <BR>
-REDIRECT_SERVER_SOFTWARE=Apache/0.8.15 <BR>
-REDIRECT_URL=/cgi-bin/buggy.pl <BR>
- </CODE></BLOCKQUOTE>
-
- <P>note the <CODE>REDIRECT_</CODE> prefix.
-
- <P>At least <CODE>REDIRECT_URL</CODE> and <CODE>REDIRECT_QUERY_STRING</CODE>
- will
- be passed to the new URL (assuming it's a cgi-script or a cgi-include).
- The
- other variables will exist only if they existed prior to the
- error/problem.
- <STRONG>None</STRONG> of these will be set if your ErrorDocument is an
- <EM>external</EM> redirect (<EM>i.e.</EM>, anything starting with a
- scheme name
- like <CODE>http:</CODE>, even if it refers to the same host as the
- server).<P>
-
-<DT>Configuration
-
- <DD> Use of "ErrorDocument" is enabled for .htaccess files when the
- <A HREF="mod/core.html#allowoverride">"FileInfo" override</A> is
- allowed.
-
- <P>Here are some examples...
-
- <BLOCKQUOTE><CODE>
-ErrorDocument 500 /cgi-bin/crash-recover <BR>
-ErrorDocument 500 "Sorry, our script crashed. Oh dear<BR>
-ErrorDocument 500 http://xxx/ <BR>
-ErrorDocument 404 /Lame_excuses/not_found.html <BR>
-ErrorDocument 401 /Subscription/how_to_subscribe.html
- </CODE></BLOCKQUOTE>
-
- <P>The syntax is,
-
- <P><CODE><A HREF="mod/core.html#errordocument">ErrorDocument</A></CODE>
-&lt;3-digit-code&gt; action
-
- <P>where the action can be,
-
- <OL>
- <LI>Text to be displayed. Prefix the text with a quote (&quot;). Whatever
- follows the quote is displayed. <EM>Note: the (&quot;) prefix isn't
- displayed.</EM>
-
- <LI>An external URL to redirect to.
-
- <LI>A local URL to redirect to.
-
- </OL>
-</DL>
-
-<P><HR><P>
-
-<H2>Custom error responses and redirects</H2>
-
-<DL>
-
-<DT>Purpose
-
- <DD>Apache's behavior to redirected URLs has been modified so that additional
- environment variables are available to a script/server-include.<P>
-
-<DT>Old behavior
-
- <DD>Standard CGI vars were made available to a script which has been
- redirected to. No indication of where the redirection came from was
- provided.
-
- <P>
-
-<DT>New behavior
- <DD>
-
-A new batch of environment variables will be initialized for use by a
-script which has been redirected to. Each new variable will have the
-prefix <CODE>REDIRECT_</CODE>. <CODE>REDIRECT_</CODE> environment
-variables are created from the CGI environment variables which existed
-prior to the redirect, they are renamed with a <CODE>REDIRECT_</CODE>
-prefix, <EM>i.e.</EM>, <CODE>HTTP_USER_AGENT</CODE> becomes
-<CODE>REDIRECT_HTTP_USER_AGENT</CODE>. In addition to these new
-variables, Apache will define <CODE>REDIRECT_URL</CODE> and
-<CODE>REDIRECT_STATUS</CODE> to help the script trace its origin.
-Both the original URL and the URL being redirected to can be logged in
-the access log.
-
-</DL>
-<P>
-If the ErrorDocument specifies a local redirect to a CGI script, the script
-should include a "<SAMP>Status:</SAMP>" header field in its output
-in order to ensure the propagation all the way back to the client
-of the error condition that caused it to be invoked. For instance, a Perl
-ErrorDocument script might include the following:
-</P>
-<PRE>
- :
- print "Content-type: text/html\n";
- printf "Status: %s Condition Intercepted\n", $ENV{"REDIRECT_STATUS"};
- :
-</PRE>
-<P>
-If the script is dedicated to handling a particular error condition, such as
-<SAMP>404&nbsp;Not&nbsp;Found</SAMP>, it can use the specific code and
-error text instead.
-</P>
-
-<!--#include virtual="footer.html" -->
-</BODY>
-</HTML>
diff --git a/docs/manual/developer/API.html b/docs/manual/developer/API.html
deleted file mode 100644
index bf0fb77d7a..0000000000
--- a/docs/manual/developer/API.html
+++ /dev/null
@@ -1,1153 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<HTML><HEAD>
-<TITLE>Apache API notes</TITLE>
-</HEAD>
-<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
-<BODY
- BGCOLOR="#FFFFFF"
- TEXT="#000000"
- LINK="#0000FF"
- VLINK="#000080"
- ALINK="#FF0000"
->
-<!--#include virtual="header.html" -->
-<H1 ALIGN="CENTER">Apache API notes</H1>
-
-These are some notes on the Apache API and the data structures you
-have to deal with, <EM>etc.</EM> They are not yet nearly complete, but
-hopefully, they will help you get your bearings. Keep in mind that
-the API is still subject to change as we gain experience with it.
-(See the TODO file for what <EM>might</EM> be coming). However,
-it will be easy to adapt modules to any changes that are made.
-(We have more modules to adapt than you do).
-<P>
-
-A few notes on general pedagogical style here. In the interest of
-conciseness, all structure declarations here are incomplete --- the
-real ones have more slots that I'm not telling you about. For the
-most part, these are reserved to one component of the server core or
-another, and should be altered by modules with caution. However, in
-some cases, they really are things I just haven't gotten around to
-yet. Welcome to the bleeding edge.<P>
-
-Finally, here's an outline, to give you some bare idea of what's
-coming up, and in what order:
-
-<UL>
-<LI> <A HREF="#basics">Basic concepts.</A>
-<MENU>
- <LI> <A HREF="#HMR">Handlers, Modules, and Requests</A>
- <LI> <A HREF="#moduletour">A brief tour of a module</A>
-</MENU>
-<LI> <A HREF="#handlers">How handlers work</A>
-<MENU>
- <LI> <A HREF="#req_tour">A brief tour of the <CODE>request_rec</CODE></A>
- <LI> <A HREF="#req_orig">Where request_rec structures come from</A>
- <LI> <A HREF="#req_return">Handling requests, declining, and returning error
- codes</A>
- <LI> <A HREF="#resp_handlers">Special considerations for response handlers</A>
- <LI> <A HREF="#auth_handlers">Special considerations for authentication
- handlers</A>
- <LI> <A HREF="#log_handlers">Special considerations for logging handlers</A>
-</MENU>
-<LI> <A HREF="#pools">Resource allocation and resource pools</A>
-<LI> <A HREF="#config">Configuration, commands and the like</A>
-<MENU>
- <LI> <A HREF="#per-dir">Per-directory configuration structures</A>
- <LI> <A HREF="#commands">Command handling</A>
- <LI> <A HREF="#servconf">Side notes --- per-server configuration,
- virtual servers, <EM>etc</EM>.</A>
-</MENU>
-</UL>
-
-<H2><A NAME="basics">Basic concepts.</A></H2>
-
-We begin with an overview of the basic concepts behind the
-API, and how they are manifested in the code.
-
-<H3><A NAME="HMR">Handlers, Modules, and Requests</A></H3>
-
-Apache breaks down request handling into a series of steps, more or
-less the same way the Netscape server API does (although this API has
-a few more stages than NetSite does, as hooks for stuff I thought
-might be useful in the future). These are:
-
-<UL>
- <LI> URI -&gt; Filename translation
- <LI> Auth ID checking [is the user who they say they are?]
- <LI> Auth access checking [is the user authorized <EM>here</EM>?]
- <LI> Access checking other than auth
- <LI> Determining MIME type of the object requested
- <LI> `Fixups' --- there aren't any of these yet, but the phase is
- intended as a hook for possible extensions like
- <CODE>SetEnv</CODE>, which don't really fit well elsewhere.
- <LI> Actually sending a response back to the client.
- <LI> Logging the request
-</UL>
-
-These phases are handled by looking at each of a succession of
-<EM>modules</EM>, looking to see if each of them has a handler for the
-phase, and attempting invoking it if so. The handler can typically do
-one of three things:
-
-<UL>
- <LI> <EM>Handle</EM> the request, and indicate that it has done so
- by returning the magic constant <CODE>OK</CODE>.
- <LI> <EM>Decline</EM> to handle the request, by returning the magic
- integer constant <CODE>DECLINED</CODE>. In this case, the
- server behaves in all respects as if the handler simply hadn't
- been there.
- <LI> Signal an error, by returning one of the HTTP error codes.
- This terminates normal handling of the request, although an
- ErrorDocument may be invoked to try to mop up, and it will be
- logged in any case.
-</UL>
-
-Most phases are terminated by the first module that handles them;
-however, for logging, `fixups', and non-access authentication
-checking, all handlers always run (barring an error). Also, the
-response phase is unique in that modules may declare multiple handlers
-for it, via a dispatch table keyed on the MIME type of the requested
-object. Modules may declare a response-phase handler which can handle
-<EM>any</EM> request, by giving it the key <CODE>*/*</CODE> (<EM>i.e.</EM>, a
-wildcard MIME type specification). However, wildcard handlers are
-only invoked if the server has already tried and failed to find a more
-specific response handler for the MIME type of the requested object
-(either none existed, or they all declined).<P>
-
-The handlers themselves are functions of one argument (a
-<CODE>request_rec</CODE> structure. vide infra), which returns an
-integer, as above.<P>
-
-<H3><A NAME="moduletour">A brief tour of a module</A></H3>
-
-At this point, we need to explain the structure of a module. Our
-candidate will be one of the messier ones, the CGI module --- this
-handles both CGI scripts and the <CODE>ScriptAlias</CODE> config file
-command. It's actually a great deal more complicated than most
-modules, but if we're going to have only one example, it might as well
-be the one with its fingers in every place.<P>
-
-Let's begin with handlers. In order to handle the CGI scripts, the
-module declares a response handler for them. Because of
-<CODE>ScriptAlias</CODE>, it also has handlers for the name
-translation phase (to recognize <CODE>ScriptAlias</CODE>ed URIs), the
-type-checking phase (any <CODE>ScriptAlias</CODE>ed request is typed
-as a CGI script).<P>
-
-The module needs to maintain some per (virtual)
-server information, namely, the <CODE>ScriptAlias</CODE>es in effect;
-the module structure therefore contains pointers to a functions which
-builds these structures, and to another which combines two of them (in
-case the main server and a virtual server both have
-<CODE>ScriptAlias</CODE>es declared).<P>
-
-Finally, this module contains code to handle the
-<CODE>ScriptAlias</CODE> command itself. This particular module only
-declares one command, but there could be more, so modules have
-<EM>command tables</EM> which declare their commands, and describe
-where they are permitted, and how they are to be invoked. <P>
-
-A final note on the declared types of the arguments of some of these
-commands: a <CODE>pool</CODE> is a pointer to a <EM>resource pool</EM>
-structure; these are used by the server to keep track of the memory
-which has been allocated, files opened, <EM>etc.</EM>, either to service a
-particular request, or to handle the process of configuring itself.
-That way, when the request is over (or, for the configuration pool,
-when the server is restarting), the memory can be freed, and the files
-closed, <EM>en masse</EM>, without anyone having to write explicit code to
-track them all down and dispose of them. Also, a
-<CODE>cmd_parms</CODE> structure contains various information about
-the config file being read, and other status information, which is
-sometimes of use to the function which processes a config-file command
-(such as <CODE>ScriptAlias</CODE>).
-
-With no further ado, the module itself:
-
-<PRE>
-/* Declarations of handlers. */
-
-int translate_scriptalias (request_rec *);
-int type_scriptalias (request_rec *);
-int cgi_handler (request_rec *);
-
-/* Subsidiary dispatch table for response-phase handlers, by MIME type */
-
-handler_rec cgi_handlers[] = {
-{ "application/x-httpd-cgi", cgi_handler },
-{ NULL }
-};
-
-/* Declarations of routines to manipulate the module's configuration
- * info. Note that these are returned, and passed in, as void *'s;
- * the server core keeps track of them, but it doesn't, and can't,
- * know their internal structure.
- */
-
-void *make_cgi_server_config (pool *);
-void *merge_cgi_server_config (pool *, void *, void *);
-
-/* Declarations of routines to handle config-file commands */
-
-extern char *script_alias(cmd_parms *, void *per_dir_config, char *fake,
- char *real);
-
-command_rec cgi_cmds[] = {
-{ "ScriptAlias", script_alias, NULL, RSRC_CONF, TAKE2,
- "a fakename and a realname"},
-{ NULL }
-};
-
-module cgi_module = {
- STANDARD_MODULE_STUFF,
- NULL, /* initializer */
- NULL, /* dir config creator */
- NULL, /* dir merger --- default is to override */
- make_cgi_server_config, /* server config */
- merge_cgi_server_config, /* merge server config */
- cgi_cmds, /* command table */
- cgi_handlers, /* handlers */
- translate_scriptalias, /* filename translation */
- NULL, /* check_user_id */
- NULL, /* check auth */
- NULL, /* check access */
- type_scriptalias, /* type_checker */
- NULL, /* fixups */
- NULL, /* logger */
- NULL /* header parser */
-};
-</PRE>
-
-<H2><A NAME="handlers">How handlers work</A></H2>
-
-The sole argument to handlers is a <CODE>request_rec</CODE> structure.
-This structure describes a particular request which has been made to
-the server, on behalf of a client. In most cases, each connection to
-the client generates only one <CODE>request_rec</CODE> structure.<P>
-
-<H3><A NAME="req_tour">A brief tour of the <CODE>request_rec</CODE></A></H3>
-
-The <CODE>request_rec</CODE> contains pointers to a resource pool
-which will be cleared when the server is finished handling the
-request; to structures containing per-server and per-connection
-information, and most importantly, information on the request itself.<P>
-
-The most important such information is a small set of character
-strings describing attributes of the object being requested, including
-its URI, filename, content-type and content-encoding (these being filled
-in by the translation and type-check handlers which handle the
-request, respectively). <P>
-
-Other commonly used data items are tables giving the MIME headers on
-the client's original request, MIME headers to be sent back with the
-response (which modules can add to at will), and environment variables
-for any subprocesses which are spawned off in the course of servicing
-the request. These tables are manipulated using the
-<CODE>ap_table_get</CODE> and <CODE>ap_table_set</CODE> routines. <P>
-<BLOCKQUOTE>
- Note that the <SAMP>Content-type</SAMP> header value <EM>cannot</EM> be
- set by module content-handlers using the <SAMP>ap_table_*()</SAMP>
- routines. Rather, it is set by pointing the <SAMP>content_type</SAMP>
- field in the <SAMP>request_rec</SAMP> structure to an appropriate
- string. <EM>E.g.</EM>,
- <PRE>
- r-&gt;content_type = "text/html";
- </PRE>
-</BLOCKQUOTE>
-Finally, there are pointers to two data structures which, in turn,
-point to per-module configuration structures. Specifically, these
-hold pointers to the data structures which the module has built to
-describe the way it has been configured to operate in a given
-directory (via <CODE>.htaccess</CODE> files or
-<CODE>&lt;Directory&gt;</CODE> sections), for private data it has
-built in the course of servicing the request (so modules' handlers for
-one phase can pass `notes' to their handlers for other phases). There
-is another such configuration vector in the <CODE>server_rec</CODE>
-data structure pointed to by the <CODE>request_rec</CODE>, which
-contains per (virtual) server configuration data.<P>
-
-Here is an abridged declaration, giving the fields most commonly used:<P>
-
-<PRE>
-struct request_rec {
-
- pool *pool;
- conn_rec *connection;
- server_rec *server;
-
- /* What object is being requested */
-
- char *uri;
- char *filename;
- char *path_info;
- char *args; /* QUERY_ARGS, if any */
- struct stat finfo; /* Set by server core;
- * st_mode set to zero if no such file */
-
- char *content_type;
- char *content_encoding;
-
- /* MIME header environments, in and out. Also, an array containing
- * environment variables to be passed to subprocesses, so people can
- * write modules to add to that environment.
- *
- * The difference between headers_out and err_headers_out is that
- * the latter are printed even on error, and persist across internal
- * redirects (so the headers printed for ErrorDocument handlers will
- * have them).
- */
-
- table *headers_in;
- table *headers_out;
- table *err_headers_out;
- table *subprocess_env;
-
- /* Info about the request itself... */
-
- int header_only; /* HEAD request, as opposed to GET */
- char *protocol; /* Protocol, as given to us, or HTTP/0.9 */
- char *method; /* GET, HEAD, POST, <EM>etc.</EM> */
- int method_number; /* M_GET, M_POST, <EM>etc.</EM> */
-
- /* Info for logging */
-
- char *the_request;
- int bytes_sent;
-
- /* A flag which modules can set, to indicate that the data being
- * returned is volatile, and clients should be told not to cache it.
- */
-
- int no_cache;
-
- /* Various other config info which may change with .htaccess files
- * These are config vectors, with one void* pointer for each module
- * (the thing pointed to being the module's business).
- */
-
- void *per_dir_config; /* Options set in config files, <EM>etc.</EM> */
- void *request_config; /* Notes on *this* request */
-
-};
-
-</PRE>
-
-<H3><A NAME="req_orig">Where request_rec structures come from</A></H3>
-
-Most <CODE>request_rec</CODE> structures are built by reading an HTTP
-request from a client, and filling in the fields. However, there are
-a few exceptions:
-
-<UL>
- <LI> If the request is to an imagemap, a type map (<EM>i.e.</EM>, a
- <CODE>*.var</CODE> file), or a CGI script which returned a
- local `Location:', then the resource which the user requested
- is going to be ultimately located by some URI other than what
- the client originally supplied. In this case, the server does
- an <EM>internal redirect</EM>, constructing a new
- <CODE>request_rec</CODE> for the new URI, and processing it
- almost exactly as if the client had requested the new URI
- directly. <P>
-
- <LI> If some handler signaled an error, and an
- <CODE>ErrorDocument</CODE> is in scope, the same internal
- redirect machinery comes into play.<P>
-
- <LI> Finally, a handler occasionally needs to investigate `what
- would happen if' some other request were run. For instance,
- the directory indexing module needs to know what MIME type
- would be assigned to a request for each directory entry, in
- order to figure out what icon to use.<P>
-
- Such handlers can construct a <EM>sub-request</EM>, using the
- functions <CODE>ap_sub_req_lookup_file</CODE>,
- <CODE>ap_sub_req_lookup_uri</CODE>, and
- <CODE>ap_sub_req_method_uri</CODE>; these construct a new
- <CODE>request_rec</CODE> structure and processes it as you
- would expect, up to but not including the point of actually
- sending a response. (These functions skip over the access
- checks if the sub-request is for a file in the same directory
- as the original request).<P>
-
- (Server-side includes work by building sub-requests and then
- actually invoking the response handler for them, via the
- function <CODE>ap_run_sub_req</CODE>).
-</UL>
-
-<H3><A NAME="req_return">Handling requests, declining, and returning error
- codes</A></H3>
-
-As discussed above, each handler, when invoked to handle a particular
-<CODE>request_rec</CODE>, has to return an <CODE>int</CODE> to
-indicate what happened. That can either be
-
-<UL>
- <LI> OK --- the request was handled successfully. This may or may
- not terminate the phase.
- <LI> DECLINED --- no erroneous condition exists, but the module
- declines to handle the phase; the server tries to find another.
- <LI> an HTTP error code, which aborts handling of the request.
-</UL>
-
-Note that if the error code returned is <CODE>REDIRECT</CODE>, then
-the module should put a <CODE>Location</CODE> in the request's
-<CODE>headers_out</CODE>, to indicate where the client should be
-redirected <EM>to</EM>. <P>
-
-<H3><A NAME="resp_handlers">Special considerations for response
- handlers</A></H3>
-
-Handlers for most phases do their work by simply setting a few fields
-in the <CODE>request_rec</CODE> structure (or, in the case of access
-checkers, simply by returning the correct error code). However,
-response handlers have to actually send a request back to the client. <P>
-
-They should begin by sending an HTTP response header, using the
-function <CODE>ap_send_http_header</CODE>. (You don't have to do
-anything special to skip sending the header for HTTP/0.9 requests; the
-function figures out on its own that it shouldn't do anything). If
-the request is marked <CODE>header_only</CODE>, that's all they should
-do; they should return after that, without attempting any further
-output. <P>
-
-Otherwise, they should produce a request body which responds to the
-client as appropriate. The primitives for this are <CODE>ap_rputc</CODE>
-and <CODE>ap_rprintf</CODE>, for internally generated output, and
-<CODE>ap_send_fd</CODE>, to copy the contents of some <CODE>FILE *</CODE>
-straight to the client. <P>
-
-At this point, you should more or less understand the following piece
-of code, which is the handler which handles <CODE>GET</CODE> requests
-which have no more specific handler; it also shows how conditional
-<CODE>GET</CODE>s can be handled, if it's desirable to do so in a
-particular response handler --- <CODE>ap_set_last_modified</CODE> checks
-against the <CODE>If-modified-since</CODE> value supplied by the
-client, if any, and returns an appropriate code (which will, if
-nonzero, be USE_LOCAL_COPY). No similar considerations apply for
-<CODE>ap_set_content_length</CODE>, but it returns an error code for
-symmetry.<P>
-
-<PRE>
-int default_handler (request_rec *r)
-{
- int errstatus;
- FILE *f;
-
- if (r-&gt;method_number != M_GET) return DECLINED;
- if (r-&gt;finfo.st_mode == 0) return NOT_FOUND;
-
- if ((errstatus = ap_set_content_length (r, r-&gt;finfo.st_size))
- || (errstatus = ap_set_last_modified (r, r-&gt;finfo.st_mtime)))
- return errstatus;
-
- f = fopen (r-&gt;filename, "r");
-
- if (f == NULL) {
- log_reason("file permissions deny server access",
- r-&gt;filename, r);
- return FORBIDDEN;
- }
-
- register_timeout ("send", r);
- ap_send_http_header (r);
-
- if (!r-&gt;header_only) send_fd (f, r);
- ap_pfclose (r-&gt;pool, f);
- return OK;
-}
-</PRE>
-
-Finally, if all of this is too much of a challenge, there are a few
-ways out of it. First off, as shown above, a response handler which
-has not yet produced any output can simply return an error code, in
-which case the server will automatically produce an error response.
-Secondly, it can punt to some other handler by invoking
-<CODE>ap_internal_redirect</CODE>, which is how the internal redirection
-machinery discussed above is invoked. A response handler which has
-internally redirected should always return <CODE>OK</CODE>. <P>
-
-(Invoking <CODE>ap_internal_redirect</CODE> from handlers which are
-<EM>not</EM> response handlers will lead to serious confusion).
-
-<H3><A NAME="auth_handlers">Special considerations for authentication
- handlers</A></H3>
-
-Stuff that should be discussed here in detail:
-
-<UL>
- <LI> Authentication-phase handlers not invoked unless auth is
- configured for the directory.
- <LI> Common auth configuration stored in the core per-dir
- configuration; it has accessors <CODE>ap_auth_type</CODE>,
- <CODE>ap_auth_name</CODE>, and <CODE>ap_requires</CODE>.
- <LI> Common routines, to handle the protocol end of things, at least
- for HTTP basic authentication (<CODE>ap_get_basic_auth_pw</CODE>,
- which sets the <CODE>connection-&gt;user</CODE> structure field
- automatically, and <CODE>ap_note_basic_auth_failure</CODE>, which
- arranges for the proper <CODE>WWW-Authenticate:</CODE> header
- to be sent back).
-</UL>
-
-<H3><A NAME="log_handlers">Special considerations for logging handlers</A></H3>
-
-When a request has internally redirected, there is the question of
-what to log. Apache handles this by bundling the entire chain of
-redirects into a list of <CODE>request_rec</CODE> structures which are
-threaded through the <CODE>r-&gt;prev</CODE> and <CODE>r-&gt;next</CODE>
-pointers. The <CODE>request_rec</CODE> which is passed to the logging
-handlers in such cases is the one which was originally built for the
-initial request from the client; note that the bytes_sent field will
-only be correct in the last request in the chain (the one for which a
-response was actually sent).
-
-<H2><A NAME="pools">Resource allocation and resource pools</A></H2>
-<P>
-One of the problems of writing and designing a server-pool server is
-that of preventing leakage, that is, allocating resources (memory,
-open files, <EM>etc.</EM>), without subsequently releasing them. The resource
-pool machinery is designed to make it easy to prevent this from
-happening, by allowing resource to be allocated in such a way that
-they are <EM>automatically</EM> released when the server is done with
-them.
-</P>
-<P>
-The way this works is as follows: the memory which is allocated, file
-opened, <EM>etc.</EM>, to deal with a particular request are tied to a
-<EM>resource pool</EM> which is allocated for the request. The pool
-is a data structure which itself tracks the resources in question.
-</P>
-<P>
-When the request has been processed, the pool is <EM>cleared</EM>. At
-that point, all the memory associated with it is released for reuse,
-all files associated with it are closed, and any other clean-up
-functions which are associated with the pool are run. When this is
-over, we can be confident that all the resource tied to the pool have
-been released, and that none of them have leaked.
-</P>
-<P>
-Server restarts, and allocation of memory and resources for per-server
-configuration, are handled in a similar way. There is a
-<EM>configuration pool</EM>, which keeps track of resources which were
-allocated while reading the server configuration files, and handling
-the commands therein (for instance, the memory that was allocated for
-per-server module configuration, log files and other files that were
-opened, and so forth). When the server restarts, and has to reread
-the configuration files, the configuration pool is cleared, and so the
-memory and file descriptors which were taken up by reading them the
-last time are made available for reuse.
-</P>
-<P>
-It should be noted that use of the pool machinery isn't generally
-obligatory, except for situations like logging handlers, where you
-really need to register cleanups to make sure that the log file gets
-closed when the server restarts (this is most easily done by using the
-function <CODE><A HREF="#pool-files">ap_pfopen</A></CODE>, which also
-arranges for the underlying file descriptor to be closed before any
-child processes, such as for CGI scripts, are <CODE>exec</CODE>ed), or
-in case you are using the timeout machinery (which isn't yet even
-documented here). However, there are two benefits to using it:
-resources allocated to a pool never leak (even if you allocate a
-scratch string, and just forget about it); also, for memory
-allocation, <CODE>ap_palloc</CODE> is generally faster than
-<CODE>malloc</CODE>.
-</P>
-<P>
-We begin here by describing how memory is allocated to pools, and then
-discuss how other resources are tracked by the resource pool
-machinery.
-</P>
-<H3>Allocation of memory in pools</H3>
-<P>
-Memory is allocated to pools by calling the function
-<CODE>ap_palloc</CODE>, which takes two arguments, one being a pointer to
-a resource pool structure, and the other being the amount of memory to
-allocate (in <CODE>char</CODE>s). Within handlers for handling
-requests, the most common way of getting a resource pool structure is
-by looking at the <CODE>pool</CODE> slot of the relevant
-<CODE>request_rec</CODE>; hence the repeated appearance of the
-following idiom in module code:
-</P>
-<PRE>
-int my_handler(request_rec *r)
-{
- struct my_structure *foo;
- ...
-
- foo = (foo *)ap_palloc (r-&gt;pool, sizeof(my_structure));
-}
-</PRE>
-<P>
-Note that <EM>there is no <CODE>ap_pfree</CODE></EM> ---
-<CODE>ap_palloc</CODE>ed memory is freed only when the associated
-resource pool is cleared. This means that <CODE>ap_palloc</CODE> does not
-have to do as much accounting as <CODE>malloc()</CODE>; all it does in
-the typical case is to round up the size, bump a pointer, and do a
-range check.
-</P>
-<P>
-(It also raises the possibility that heavy use of <CODE>ap_palloc</CODE>
-could cause a server process to grow excessively large. There are
-two ways to deal with this, which are dealt with below; briefly, you
-can use <CODE>malloc</CODE>, and try to be sure that all of the memory
-gets explicitly <CODE>free</CODE>d, or you can allocate a sub-pool of
-the main pool, allocate your memory in the sub-pool, and clear it out
-periodically. The latter technique is discussed in the section on
-sub-pools below, and is used in the directory-indexing code, in order
-to avoid excessive storage allocation when listing directories with
-thousands of files).
-</P>
-<H3>Allocating initialized memory</H3>
-<P>
-There are functions which allocate initialized memory, and are
-frequently useful. The function <CODE>ap_pcalloc</CODE> has the same
-interface as <CODE>ap_palloc</CODE>, but clears out the memory it
-allocates before it returns it. The function <CODE>ap_pstrdup</CODE>
-takes a resource pool and a <CODE>char *</CODE> as arguments, and
-allocates memory for a copy of the string the pointer points to,
-returning a pointer to the copy. Finally <CODE>ap_pstrcat</CODE> is a
-varargs-style function, which takes a pointer to a resource pool, and
-at least two <CODE>char *</CODE> arguments, the last of which must be
-<CODE>NULL</CODE>. It allocates enough memory to fit copies of each
-of the strings, as a unit; for instance:
-</P>
-<PRE>
- ap_pstrcat (r-&gt;pool, "foo", "/", "bar", NULL);
-</PRE>
-<P>
-returns a pointer to 8 bytes worth of memory, initialized to
-<CODE>"foo/bar"</CODE>.
-</P>
-<H3><A NAME="pools-used">Commonly-used pools in the Apache Web server</A></H3>
-<P>
-A pool is really defined by its lifetime more than anything else. There
-are some static pools in http_main which are passed to various
-non-http_main functions as arguments at opportune times. Here they are:
-</P>
-<DL COMPACT>
- <DT>permanent_pool
- </DT>
- <DD>
- <UL>
- <LI>never passed to anything else, this is the ancestor of all pools
- </LI>
- </UL>
- </DD>
- <DT>pconf
- </DT>
- <DD>
- <UL>
- <LI>subpool of permanent_pool
- </LI>
- <LI>created at the beginning of a config "cycle"; exists until the
- server is terminated or restarts; passed to all config-time
- routines, either via cmd-&gt;pool, or as the "pool *p" argument on
- those which don't take pools
- </LI>
- <LI>passed to the module init() functions
- </LI>
- </UL>
- </DD>
- <DT>ptemp
- </DT>
- <DD>
- <UL>
- <LI>sorry I lie, this pool isn't called this currently in 1.3, I
- renamed it this in my pthreads development. I'm referring to
- the use of ptrans in the parent... contrast this with the later
- definition of ptrans in the child.
- </LI>
- <LI>subpool of permanent_pool
- </LI>
- <LI>created at the beginning of a config "cycle"; exists until the
- end of config parsing; passed to config-time routines <EM>via</EM>
- cmd-&gt;temp_pool. Somewhat of a "bastard child" because it isn't
- available everywhere. Used for temporary scratch space which
- may be needed by some config routines but which is deleted at
- the end of config.
- </LI>
- </UL>
- </DD>
- <DT>pchild
- </DT>
- <DD>
- <UL>
- <LI>subpool of permanent_pool
- </LI>
- <LI>created when a child is spawned (or a thread is created); lives
- until that child (thread) is destroyed
- </LI>
- <LI>passed to the module child_init functions
- </LI>
- <LI>destruction happens right after the child_exit functions are
- called... (which may explain why I think child_exit is redundant
- and unneeded)
- </LI>
- </UL>
- </DD>
- <DT>ptrans
- <DT>
- <DD>
- <UL>
- <LI>should be a subpool of pchild, but currently is a subpool of
- permanent_pool, see above
- </LI>
- <LI>cleared by the child before going into the accept() loop to receive
- a connection
- </LI>
- <LI>used as connection-&gt;pool
- </LI>
- </UL>
- </DD>
- <DT>r-&gt;pool
- </DT>
- <DD>
- <UL>
- <LI>for the main request this is a subpool of connection-&gt;pool; for
- subrequests it is a subpool of the parent request's pool.
- </LI>
- <LI>exists until the end of the request (<EM>i.e.</EM>,
- ap_destroy_sub_req, or
- in child_main after process_request has finished)
- </LI>
- <LI>note that r itself is allocated from r-&gt;pool; <EM>i.e.</EM>,
- r-&gt;pool is
- first created and then r is the first thing palloc()d from it
- </LI>
- </UL>
- </DD>
-</DL>
-<P>
-For almost everything folks do, r-&gt;pool is the pool to use. But you
-can see how other lifetimes, such as pchild, are useful to some
-modules... such as modules that need to open a database connection once
-per child, and wish to clean it up when the child dies.
-</P>
-<P>
-You can also see how some bugs have manifested themself, such as setting
-connection-&gt;user to a value from r-&gt;pool -- in this case
-connection exists
-for the lifetime of ptrans, which is longer than r-&gt;pool (especially if
-r-&gt;pool is a subrequest!). So the correct thing to do is to allocate
-from connection-&gt;pool.
-</P>
-<P>
-And there was another interesting bug in mod_include/mod_cgi. You'll see
-in those that they do this test to decide if they should use r-&gt;pool
-or r-&gt;main-&gt;pool. In this case the resource that they are registering
-for cleanup is a child process. If it were registered in r-&gt;pool,
-then the code would wait() for the child when the subrequest finishes.
-With mod_include this could be any old #include, and the delay can be up
-to 3 seconds... and happened quite frequently. Instead the subprocess
-is registered in r-&gt;main-&gt;pool which causes it to be cleaned up when
-the entire request is done -- <EM>i.e.</EM>, after the output has been sent to
-the client and logging has happened.
-</P>
-<H3><A NAME="pool-files">Tracking open files, etc.</A></H3>
-<P>
-As indicated above, resource pools are also used to track other sorts
-of resources besides memory. The most common are open files. The
-routine which is typically used for this is <CODE>ap_pfopen</CODE>, which
-takes a resource pool and two strings as arguments; the strings are
-the same as the typical arguments to <CODE>fopen</CODE>, <EM>e.g.</EM>,
-</P>
-<PRE>
- ...
- FILE *f = ap_pfopen (r-&gt;pool, r-&gt;filename, "r");
-
- if (f == NULL) { ... } else { ... }
-</PRE>
-<P>
-There is also a <CODE>ap_popenf</CODE> routine, which parallels the
-lower-level <CODE>open</CODE> system call. Both of these routines
-arrange for the file to be closed when the resource pool in question
-is cleared.
-</P>
-<P>
-Unlike the case for memory, there <EM>are</EM> functions to close
-files allocated with <CODE>ap_pfopen</CODE>, and <CODE>ap_popenf</CODE>,
-namely <CODE>ap_pfclose</CODE> and <CODE>ap_pclosef</CODE>. (This is
-because, on many systems, the number of files which a single process
-can have open is quite limited). It is important to use these
-functions to close files allocated with <CODE>ap_pfopen</CODE> and
-<CODE>ap_popenf</CODE>, since to do otherwise could cause fatal errors on
-systems such as Linux, which react badly if the same
-<CODE>FILE*</CODE> is closed more than once.
-</P>
-<P>
-(Using the <CODE>close</CODE> functions is not mandatory, since the
-file will eventually be closed regardless, but you should consider it
-in cases where your module is opening, or could open, a lot of files).
-</P>
-<H3>Other sorts of resources --- cleanup functions</H3>
-<BLOCKQUOTE>
-More text goes here. Describe the the cleanup primitives in terms of
-which the file stuff is implemented; also, <CODE>spawn_process</CODE>.
-</BLOCKQUOTE>
-<P>
-Pool cleanups live until clear_pool() is called: clear_pool(a) recursively
-calls destroy_pool() on all subpools of a; then calls all the cleanups for a;
-then releases all the memory for a. destroy_pool(a) calls clear_pool(a)
-and then releases the pool structure itself. <EM>i.e.</EM>, clear_pool(a) doesn't
-delete a, it just frees up all the resources and you can start using it
-again immediately.
-</P>
-<H3>Fine control --- creating and dealing with sub-pools, with a note
-on sub-requests</H3>
-
-On rare occasions, too-free use of <CODE>ap_palloc()</CODE> and the
-associated primitives may result in undesirably profligate resource
-allocation. You can deal with such a case by creating a
-<EM>sub-pool</EM>, allocating within the sub-pool rather than the main
-pool, and clearing or destroying the sub-pool, which releases the
-resources which were associated with it. (This really <EM>is</EM> a
-rare situation; the only case in which it comes up in the standard
-module set is in case of listing directories, and then only with
-<EM>very</EM> large directories. Unnecessary use of the primitives
-discussed here can hair up your code quite a bit, with very little
-gain). <P>
-
-The primitive for creating a sub-pool is <CODE>ap_make_sub_pool</CODE>,
-which takes another pool (the parent pool) as an argument. When the
-main pool is cleared, the sub-pool will be destroyed. The sub-pool
-may also be cleared or destroyed at any time, by calling the functions
-<CODE>ap_clear_pool</CODE> and <CODE>ap_destroy_pool</CODE>, respectively.
-(The difference is that <CODE>ap_clear_pool</CODE> frees resources
-associated with the pool, while <CODE>ap_destroy_pool</CODE> also
-deallocates the pool itself. In the former case, you can allocate new
-resources within the pool, and clear it again, and so forth; in the
-latter case, it is simply gone). <P>
-
-One final note --- sub-requests have their own resource pools, which
-are sub-pools of the resource pool for the main request. The polite
-way to reclaim the resources associated with a sub request which you
-have allocated (using the <CODE>ap_sub_req_...</CODE> functions)
-is <CODE>ap_destroy_sub_req</CODE>, which frees the resource pool.
-Before calling this function, be sure to copy anything that you care
-about which might be allocated in the sub-request's resource pool into
-someplace a little less volatile (for instance, the filename in its
-<CODE>request_rec</CODE> structure). <P>
-
-(Again, under most circumstances, you shouldn't feel obliged to call
-this function; only 2K of memory or so are allocated for a typical sub
-request, and it will be freed anyway when the main request pool is
-cleared. It is only when you are allocating many, many sub-requests
-for a single main request that you should seriously consider the
-<CODE>ap_destroy_...</CODE> functions).
-
-<H2><A NAME="config">Configuration, commands and the like</A></H2>
-
-One of the design goals for this server was to maintain external
-compatibility with the NCSA 1.3 server --- that is, to read the same
-configuration files, to process all the directives therein correctly,
-and in general to be a drop-in replacement for NCSA. On the other
-hand, another design goal was to move as much of the server's
-functionality into modules which have as little as possible to do with
-the monolithic server core. The only way to reconcile these goals is
-to move the handling of most commands from the central server into the
-modules. <P>
-
-However, just giving the modules command tables is not enough to
-divorce them completely from the server core. The server has to
-remember the commands in order to act on them later. That involves
-maintaining data which is private to the modules, and which can be
-either per-server, or per-directory. Most things are per-directory,
-including in particular access control and authorization information,
-but also information on how to determine file types from suffixes,
-which can be modified by <CODE>AddType</CODE> and
-<CODE>DefaultType</CODE> directives, and so forth. In general, the
-governing philosophy is that anything which <EM>can</EM> be made
-configurable by directory should be; per-server information is
-generally used in the standard set of modules for information like
-<CODE>Alias</CODE>es and <CODE>Redirect</CODE>s which come into play
-before the request is tied to a particular place in the underlying
-file system. <P>
-
-Another requirement for emulating the NCSA server is being able to
-handle the per-directory configuration files, generally called
-<CODE>.htaccess</CODE> files, though even in the NCSA server they can
-contain directives which have nothing at all to do with access
-control. Accordingly, after URI -&gt; filename translation, but before
-performing any other phase, the server walks down the directory
-hierarchy of the underlying filesystem, following the translated
-pathname, to read any <CODE>.htaccess</CODE> files which might be
-present. The information which is read in then has to be
-<EM>merged</EM> with the applicable information from the server's own
-config files (either from the <CODE>&lt;Directory&gt;</CODE> sections
-in <CODE>access.conf</CODE>, or from defaults in
-<CODE>srm.conf</CODE>, which actually behaves for most purposes almost
-exactly like <CODE>&lt;Directory /&gt;</CODE>).<P>
-
-Finally, after having served a request which involved reading
-<CODE>.htaccess</CODE> files, we need to discard the storage allocated
-for handling them. That is solved the same way it is solved wherever
-else similar problems come up, by tying those structures to the
-per-transaction resource pool. <P>
-
-<H3><A NAME="per-dir">Per-directory configuration structures</A></H3>
-
-Let's look out how all of this plays out in <CODE>mod_mime.c</CODE>,
-which defines the file typing handler which emulates the NCSA server's
-behavior of determining file types from suffixes. What we'll be
-looking at, here, is the code which implements the
-<CODE>AddType</CODE> and <CODE>AddEncoding</CODE> commands. These
-commands can appear in <CODE>.htaccess</CODE> files, so they must be
-handled in the module's private per-directory data, which in fact,
-consists of two separate <CODE>table</CODE>s for MIME types and
-encoding information, and is declared as follows:
-
-<PRE>
-typedef struct {
- table *forced_types; /* Additional AddTyped stuff */
- table *encoding_types; /* Added with AddEncoding... */
-} mime_dir_config;
-</PRE>
-
-When the server is reading a configuration file, or
-<CODE>&lt;Directory&gt;</CODE> section, which includes one of the MIME
-module's commands, it needs to create a <CODE>mime_dir_config</CODE>
-structure, so those commands have something to act on. It does this
-by invoking the function it finds in the module's `create per-dir
-config slot', with two arguments: the name of the directory to which
-this configuration information applies (or <CODE>NULL</CODE> for
-<CODE>srm.conf</CODE>), and a pointer to a resource pool in which the
-allocation should happen. <P>
-
-(If we are reading a <CODE>.htaccess</CODE> file, that resource pool
-is the per-request resource pool for the request; otherwise it is a
-resource pool which is used for configuration data, and cleared on
-restarts. Either way, it is important for the structure being created
-to vanish when the pool is cleared, by registering a cleanup on the
-pool if necessary). <P>
-
-For the MIME module, the per-dir config creation function just
-<CODE>ap_palloc</CODE>s the structure above, and a creates a couple of
-<CODE>table</CODE>s to fill it. That looks like this:
-
-<PRE>
-void *create_mime_dir_config (pool *p, char *dummy)
-{
- mime_dir_config *new =
- (mime_dir_config *) ap_palloc (p, sizeof(mime_dir_config));
-
- new-&gt;forced_types = ap_make_table (p, 4);
- new-&gt;encoding_types = ap_make_table (p, 4);
-
- return new;
-}
-</PRE>
-
-Now, suppose we've just read in a <CODE>.htaccess</CODE> file. We
-already have the per-directory configuration structure for the next
-directory up in the hierarchy. If the <CODE>.htaccess</CODE> file we
-just read in didn't have any <CODE>AddType</CODE> or
-<CODE>AddEncoding</CODE> commands, its per-directory config structure
-for the MIME module is still valid, and we can just use it.
-Otherwise, we need to merge the two structures somehow. <P>
-
-To do that, the server invokes the module's per-directory config merge
-function, if one is present. That function takes three arguments:
-the two structures being merged, and a resource pool in which to
-allocate the result. For the MIME module, all that needs to be done
-is overlay the tables from the new per-directory config structure with
-those from the parent:
-
-<PRE>
-void *merge_mime_dir_configs (pool *p, void *parent_dirv, void *subdirv)
-{
- mime_dir_config *parent_dir = (mime_dir_config *)parent_dirv;
- mime_dir_config *subdir = (mime_dir_config *)subdirv;
- mime_dir_config *new =
- (mime_dir_config *)ap_palloc (p, sizeof(mime_dir_config));
-
- new-&gt;forced_types = ap_overlay_tables (p, subdir-&gt;forced_types,
- parent_dir-&gt;forced_types);
- new-&gt;encoding_types = ap_overlay_tables (p, subdir-&gt;encoding_types,
- parent_dir-&gt;encoding_types);
-
- return new;
-}
-</PRE>
-
-As a note --- if there is no per-directory merge function present, the
-server will just use the subdirectory's configuration info, and ignore
-the parent's. For some modules, that works just fine (<EM>e.g.</EM>, for the
-includes module, whose per-directory configuration information
-consists solely of the state of the <CODE>XBITHACK</CODE>), and for
-those modules, you can just not declare one, and leave the
-corresponding structure slot in the module itself <CODE>NULL</CODE>.<P>
-
-<H3><A NAME="commands">Command handling</A></H3>
-
-Now that we have these structures, we need to be able to figure out
-how to fill them. That involves processing the actual
-<CODE>AddType</CODE> and <CODE>AddEncoding</CODE> commands. To find
-commands, the server looks in the module's <CODE>command table</CODE>.
-That table contains information on how many arguments the commands
-take, and in what formats, where it is permitted, and so forth. That
-information is sufficient to allow the server to invoke most
-command-handling functions with pre-parsed arguments. Without further
-ado, let's look at the <CODE>AddType</CODE> command handler, which
-looks like this (the <CODE>AddEncoding</CODE> command looks basically
-the same, and won't be shown here):
-
-<PRE>
-char *add_type(cmd_parms *cmd, mime_dir_config *m, char *ct, char *ext)
-{
- if (*ext == '.') ++ext;
- ap_table_set (m-&gt;forced_types, ext, ct);
- return NULL;
-}
-</PRE>
-
-This command handler is unusually simple. As you can see, it takes
-four arguments, two of which are pre-parsed arguments, the third being
-the per-directory configuration structure for the module in question,
-and the fourth being a pointer to a <CODE>cmd_parms</CODE> structure.
-That structure contains a bunch of arguments which are frequently of
-use to some, but not all, commands, including a resource pool (from
-which memory can be allocated, and to which cleanups should be tied),
-and the (virtual) server being configured, from which the module's
-per-server configuration data can be obtained if required.<P>
-
-Another way in which this particular command handler is unusually
-simple is that there are no error conditions which it can encounter.
-If there were, it could return an error message instead of
-<CODE>NULL</CODE>; this causes an error to be printed out on the
-server's <CODE>stderr</CODE>, followed by a quick exit, if it is in
-the main config files; for a <CODE>.htaccess</CODE> file, the syntax
-error is logged in the server error log (along with an indication of
-where it came from), and the request is bounced with a server error
-response (HTTP error status, code 500). <P>
-
-The MIME module's command table has entries for these commands, which
-look like this:
-
-<PRE>
-command_rec mime_cmds[] = {
-{ "AddType", add_type, NULL, OR_FILEINFO, TAKE2,
- "a mime type followed by a file extension" },
-{ "AddEncoding", add_encoding, NULL, OR_FILEINFO, TAKE2,
- "an encoding (<EM>e.g.</EM>, gzip), followed by a file extension" },
-{ NULL }
-};
-</PRE>
-
-The entries in these tables are:
-
-<UL>
- <LI> The name of the command
- <LI> The function which handles it
- <LI> a <CODE>(void *)</CODE> pointer, which is passed in the
- <CODE>cmd_parms</CODE> structure to the command handler ---
- this is useful in case many similar commands are handled by the
- same function.
- <LI> A bit mask indicating where the command may appear. There are
- mask bits corresponding to each <CODE>AllowOverride</CODE>
- option, and an additional mask bit, <CODE>RSRC_CONF</CODE>,
- indicating that the command may appear in the server's own
- config files, but <EM>not</EM> in any <CODE>.htaccess</CODE>
- file.
- <LI> A flag indicating how many arguments the command handler wants
- pre-parsed, and how they should be passed in.
- <CODE>TAKE2</CODE> indicates two pre-parsed arguments. Other
- options are <CODE>TAKE1</CODE>, which indicates one pre-parsed
- argument, <CODE>FLAG</CODE>, which indicates that the argument
- should be <CODE>On</CODE> or <CODE>Off</CODE>, and is passed in
- as a boolean flag, <CODE>RAW_ARGS</CODE>, which causes the
- server to give the command the raw, unparsed arguments
- (everything but the command name itself). There is also
- <CODE>ITERATE</CODE>, which means that the handler looks the
- same as <CODE>TAKE1</CODE>, but that if multiple arguments are
- present, it should be called multiple times, and finally
- <CODE>ITERATE2</CODE>, which indicates that the command handler
- looks like a <CODE>TAKE2</CODE>, but if more arguments are
- present, then it should be called multiple times, holding the
- first argument constant.
- <LI> Finally, we have a string which describes the arguments that
- should be present. If the arguments in the actual config file
- are not as required, this string will be used to help give a
- more specific error message. (You can safely leave this
- <CODE>NULL</CODE>).
-</UL>
-
-Finally, having set this all up, we have to use it. This is
-ultimately done in the module's handlers, specifically for its
-file-typing handler, which looks more or less like this; note that the
-per-directory configuration structure is extracted from the
-<CODE>request_rec</CODE>'s per-directory configuration vector by using
-the <CODE>ap_get_module_config</CODE> function.
-
-<PRE>
-int find_ct(request_rec *r)
-{
- int i;
- char *fn = ap_pstrdup (r-&gt;pool, r-&gt;filename);
- mime_dir_config *conf = (mime_dir_config *)
- ap_get_module_config(r-&gt;per_dir_config, &amp;mime_module);
- char *type;
-
- if (S_ISDIR(r-&gt;finfo.st_mode)) {
- r-&gt;content_type = DIR_MAGIC_TYPE;
- return OK;
- }
-
- if((i=ap_rind(fn,'.')) &lt; 0) return DECLINED;
- ++i;
-
- if ((type = ap_table_get (conf-&gt;encoding_types, &amp;fn[i])))
- {
- r-&gt;content_encoding = type;
-
- /* go back to previous extension to try to use it as a type */
-
- fn[i-1] = '\0';
- if((i=ap_rind(fn,'.')) &lt; 0) return OK;
- ++i;
- }
-
- if ((type = ap_table_get (conf-&gt;forced_types, &amp;fn[i])))
- {
- r-&gt;content_type = type;
- }
-
- return OK;
-}
-
-</PRE>
-
-<H3><A NAME="servconf">Side notes --- per-server configuration, virtual
- servers, <EM>etc</EM>.</A></H3>
-
-The basic ideas behind per-server module configuration are basically
-the same as those for per-directory configuration; there is a creation
-function and a merge function, the latter being invoked where a
-virtual server has partially overridden the base server configuration,
-and a combined structure must be computed. (As with per-directory
-configuration, the default if no merge function is specified, and a
-module is configured in some virtual server, is that the base
-configuration is simply ignored). <P>
-
-The only substantial difference is that when a command needs to
-configure the per-server private module data, it needs to go to the
-<CODE>cmd_parms</CODE> data to get at it. Here's an example, from the
-alias module, which also indicates how a syntax error can be returned
-(note that the per-directory configuration argument to the command
-handler is declared as a dummy, since the module doesn't actually have
-per-directory config data):
-
-<PRE>
-char *add_redirect(cmd_parms *cmd, void *dummy, char *f, char *url)
-{
- server_rec *s = cmd-&gt;server;
- alias_server_conf *conf = (alias_server_conf *)
- ap_get_module_config(s-&gt;module_config,&amp;alias_module);
- alias_entry *new = ap_push_array (conf-&gt;redirects);
-
- if (!ap_is_url (url)) return "Redirect to non-URL";
-
- new-&gt;fake = f; new-&gt;real = url;
- return NULL;
-}
-</PRE>
-<!--#include virtual="footer.html" -->
-</BODY></HTML>
diff --git a/docs/manual/developer/modules.html.en b/docs/manual/developer/modules.html.en
deleted file mode 100644
index b066223466..0000000000
--- a/docs/manual/developer/modules.html.en
+++ /dev/null
@@ -1,200 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<HTML>
-<HEAD>
-<TITLE>Converting Modules from Apache 1.3 to Apache 2.0</TITLE>
-</HEAD>
-
-<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
-<BODY
- BGCOLOR="#FFFFFF"
- TEXT="#000000"
- LINK="#0000FF"
- VLINK="#000080"
- ALINK="#FF0000"
->
-
-<H1 ALIGN="CENTER">From Apache 1.3 to Apache 2.0<br>Modules</H1>
-
-<p>
-This is a first attempt at writing the lessons I learned when trying to convert the mod_mmap_static module to Apache 2.0. It's by no means definitive and probably won't even be correct in some ways, but it's a start.
-</p>
-<hr>
-<h2>The easier changes...
-</h2>
-
-<h3>Cleanup Routines</h3>
-<p>
-These now need to be of type ap_status_t and return a value of that type. Normally the return value will be APR_SUCCESS unless there is some need to signal an error in the cleanup. Be aware that even though you signal an error not all code yet checks and acts upon the error.
-</p>
-
-<h3>Initialisation Routines</h3>
-
-<p>
-These should now be renamed to better signify where they sit in the overall process. So the name gets a small change from mmap_init to mmap_post_config. The arguments passed have undergone a radical change and now look like
-</p>
-<ul style="list-style:none">
-<li>ap_context_t *p,</li>
-<li>ap_context_t *plog,</li>
-<li>ap_context_t *ptemp,</li>
-<li>server_rec *s</li>
-</ul>
-<p>
-Throughout Apache the old pools have been replced by the ap_context_t, though their use remains remarkably similar.
-</p>
-
-<h3>Data Types</h3>
-<p>
-A lot of the data types have been moved into the APR. This means that some have had a name change, such as the one shown above. The following is a brief list of some of the changes that you are likely to have to make.
-<ul style="list-style:none">
-<li>pool becomes ap_context_t</li>
-<li>table becomes ap_table_t</li>
-</ul>
-<hr>
-
-<h2>
-The <em>messier</em> changes...
-</h2>
-<h3>Register Hooks</h3>
-<p>
-The new architecture uses a series of hooks to provide for calling your functions. These you'll need to add to your module by way of a new function, static void register_hooks(void). The function is really reasonably straightforward once you understand what needs to be done. Each function that needs calling at some stage in the processing of a request needs to be registered, handlers do not. There are a number of phases where functions can be added, and for each you can specify with a high degree of control the relative order that the function will be called in.
-</p>
-<p>
-This is the code that was added to mod_mmap_static
-</p>
-<pre>
-static void register_hooks(void)
-{
- static const char * const aszPre[]={ "http_core.c",NULL };
- ap_hook_post_config(mmap_post_config,NULL,NULL,HOOK_MIDDLE);
- ap_hook_translate_name(mmap_static_xlat,aszPre,NULL,HOOK_LAST);
-};
-</pre>
-<p>
-This registers 2 functions that need to be called, one in the post_config stage (virtually every module will need this one) and one for the translate_name phase. note that while there are different function names the format of each is identical. So what is the format?
-</p>
-<p><strong>
-ap_hook_[phase_name](function_name, predecessors, successors, position);
-</strong></p>
-<p>
-There are 3 hook positions defined...
-</p>
-<ul style="list-style:none">
-<li>HOOK_FIRST</li>
-<li>HOOK_MIDDLE</li>
-<li>HOOK_LAST</li>
-</ul>
-<p>
-To define the position you use the position and then modify it with the predecessors and successors. each of the modifiers can be a list of functions that should be called, either before the function is run (predecessors) or after the function has run (successors).
-</p>
-<p>
-In the mod_mmap_static case I didn't care about the post_config stage, but the mmap_static_xlat MUST be called after the core module had done it's name translation, hence the use of the aszPre to define a modifier to the position HOOK_LAST.
-</p>
-<h3>Module Definition</h3>
-
-<p>
-There are now a lot fewer stages to worry about when creating your module definition. The old defintion looked like
-</p>
-<pre>
-module MODULE_VAR_EXPORT [module_name]_module =
-{
- STANDARD_MODULE_STUFF,
- /* initializer */
- /* dir config creater */
- /* dir merger --- default is to override */
- /* server config */
- /* merge server config */
- /* command handlers */
- /* handlers */
- /* filename translation */
- /* check_user_id */
- /* check auth */
- /* check access */
- /* type_checker */
- /* fixups */
- /* logger */
- /* header parser */
- /* child_init */
- /* child_exit */
- /* post read-request */
-};
-</pre>
-<p>
-The new structure is a great deal simpler...
-</p>
-<pre>
-module MODULE_VAR_EXPORT [module_name]_module =
-{
- STANDARD20_MODULE_STUFF,
- /* create per-directory config structures */
- /* merge per-directory config structures */
- /* create per-server config structures */
- /* merge per-server config structures */
- /* command handlers */
- /* handlers */
- /* register hooks */
- };
-</pre>
-<p>
-Some of these read directly across, some don't. I'll try to summarise what should be done below.
-</p>
-<p>
-The stages that read directly across :
-</p>
-<ul style="list-style:none">
-<li>
-/* dir config creater */ ==> /* create per-directory config structures */
-</li>
-<li>
-/* server config */ ==> /* create per-server config structures */
-</li>
-<li>
-/* dir merger */ ==> /* merge per-directory config structures */
-</li>
-<li>
-/* merge server config */ ==> /* merge per-server config structures */
-</li>
-<li>
-/* command table */ ==> /* command ap_table_t */
-</li>
-<li>
-/* handlers */ ==> /* handlers */
-</li>
-</ul>
-<P>
-The remainder of the old functions should be registered as hooks. There are the following hook stages defined so far...
-</P>
-
-<ul style="list-style:none">
-<li>
-ap_hook_post_config <em>(this is where the old _init routines get registered)</em>
-</li>
-<li>
-ap_hook_http_method
-</li>
-<li>
-ap_hook_open_logs
-</li>
-<li>
-ap_hook_auth_checker
-</li>
-<li>
-ap_hook_default_port
-</li>
-<li>
-ap_hook_access_checker
-</li>
-<li>
-ap_hook_process_connection
-</li>
-<li>
-ap_hook_child_init_hook
-</li>
-
-
-</body>
-</html>
-
-
-
-
-
diff --git a/docs/manual/dso.html.en b/docs/manual/dso.html.en
deleted file mode 100644
index 66e6fc9841..0000000000
--- a/docs/manual/dso.html.en
+++ /dev/null
@@ -1,393 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<HTML><HEAD>
-<TITLE>Apache 1.3 Dynamic Shared Object (DSO) support</TITLE>
-</HEAD>
-
-<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
-<BODY
- BGCOLOR="#FFFFFF"
- TEXT="#000000"
- LINK="#0000FF"
- VLINK="#000080"
- ALINK="#FF0000"
->
-<BLOCKQUOTE>
-<!--#include virtual="header.html" -->
-
-<DIV ALIGN=CENTER>
-
-<H1>
-Apache 1.3<BR>
-Dynamic Shared Object (DSO)<BR>
-Support
-</H1>
-
-<ADDRESS>Originally written by<BR>
-Ralf S. Engelschall &lt;rse@apache.org&gt, April 1998</ADDRESS>
-
-</DIV>
-
-<H3>Background</H3>
-
-<P>On modern Unix derivatives there exists a nifty mechanism usually called
-dynamic linking/loading of <EM>Dynamic Shared Objects</EM> (DSO) which
-provides a way to build a piece of program code in a special format for
-loading it at run-time into the address space of an executable program.
-
-<P>This loading can usually be done in two ways: Automatically by a system
-program called <CODE>ld.so</CODE> when an executable program is started or
-manually from within the executing program via a programmatic system interface
-to the Unix loader through the system calls <CODE>dlopen()/dlsym()</CODE>.
-
-<P>In the first way the DSO's are usually called <EM>shared libraries</EM> or
-<EM>DSO libraries</EM> and named <CODE>libfoo.so</CODE> or
-<CODE>libfoo.so.1.2</CODE>. They reside in a system directory (usually
-<CODE>/usr/lib</CODE>) and the link to the executable program is established
-at build-time by specifying <CODE>-lfoo</CODE> to the linker command. This
-hard-codes library references into the executable program file so that at
-start-time the Unix loader is able to locate <CODE>libfoo.so</CODE> in
-<CODE>/usr/lib</CODE>, in paths hard-coded via linker-options like
-<CODE>-R</CODE> or in paths configured via the environment variable
-<CODE>LD_LIBRARY_PATH</CODE>. It then resolves any (yet unresolved) symbols in
-the executable program which are available in the DSO.
-
-<P>Symbols in the executable program are usually not referenced by the DSO
-(because it's a reusable library of general code) and hence no further
-resolving has to be done. The executable program has no need to do anything on
-its own to use the symbols from the DSO because the complete resolving is done
-by the Unix loader. (In fact, the code to invoke <CODE>ld.so</CODE> is part of
-the run-time startup code which is linked into every executable program which
-has been bound non-static). The advantage of dynamic loading of common library
-code is obvious: the library code needs to be stored only once, in a system
-library like <CODE>libc.so</CODE>, saving disk space for every program.
-
-<P>In the second way the DSO's are usually called <EM>shared objects</EM> or
-<EM>DSO files</EM> and can be named with an arbitrary extension (although the
-canonical name is <CODE>foo.so</CODE>). These files usually stay inside a
-program-specific directory and there is no automatically established link to
-the executable program where they are used. Instead the executable program
-manually loads the DSO at run-time into its address space via
-<CODE>dlopen()</CODE>. At this time no resolving of symbols from the DSO for
-the executable program is done. But instead the Unix loader automatically
-resolves any (yet unresolved) symbols in the DSO from the set of symbols
-exported by the executable program and its already loaded DSO libraries
-(especially all symbols from the ubiquitous <CODE>libc.so</CODE>). This way
-the DSO gets knowledge of the executable program's symbol set as if it had
-been statically linked with it in the first place.
-
-<P>Finally, to take advantage of the DSO's API the executable program has to
-resolve particular symbols from the DSO via <CODE>dlsym()</CODE> for later use
-inside dispatch tables <EM>etc.</EM> In other words: The executable program has to
-manually resolve every symbol it needs to be able to use it. The advantage of
-such a mechanism is that optional program parts need not be loaded (and thus
-do not spend memory) until they are needed by the program in question. When
-required, these program parts can be loaded dynamically to extend the base
-program's functionality.
-
-<P>Although this DSO mechanism sounds straightforward there is at least one
-difficult step here: The resolving of symbols from the executable program for
-the DSO when using a DSO to extend a program (the second way). Why? Because
-"reverse resolving" DSO symbols from the executable program's symbol set is
-against the library design (where the library has no knowledge about the
-programs it is used by) and is neither available under all platforms nor
-standardized. In practice the executable program's global symbols are often
-not re-exported and thus not available for use in a DSO. Finding a way to
-force the linker to export all global symbols is the main problem one has to
-solve when using DSO for extending a program at run-time.
-
-<H3>Practical Usage</H3>
-
-<P>The shared library approach is the typical one, because it is what the DSO
-mechanism was designed for, hence it is used for nearly all types of libraries
-the operating system provides. On the other hand using shared objects for
-extending a program is not used by a lot of programs.
-
-<P>As of 1998 there are only a few software packages available which use the
-DSO mechanism to actually extend their functionality at run-time: Perl 5 (via
-its XS mechanism and the DynaLoader module), Netscape Server, <EM>etc.</EM> Starting
-with version 1.3, Apache joined the crew, because Apache already uses a module
-concept to extend its functionality and internally uses a dispatch-list-based
-approach to link external modules into the Apache core functionality. So,
-Apache is really predestined for using DSO to load its modules at run-time.
-
-<P>As of Apache 1.3, the configuration system supports two optional features
-for taking advantage of the modular DSO approach: compilation of the Apache
-core program into a DSO library for shared usage and compilation of the
-Apache modules into DSO files for explicit loading at run-time.
-
-<H3>Implementation</H3>
-
-<P>The DSO support for loading individual Apache modules is based on a module
-named <A HREF="mod/mod_so.html"><CODE>mod_so.c</CODE></A> which has to be
-statically compiled into the Apache core. It is the only module besides
-<CODE>http_core.c</CODE> which cannot be put into a DSO itself
-(bootstrapping!). Practically all other distributed Apache modules then can
-then be placed into a DSO by individually enabling the DSO build for them via
-<CODE>configure</CODE>'s <CODE>--enable-shared</CODE> option (see top-level
-<CODE>INSTALL</CODE> file) or by changing the <CODE>AddModule</CODE> command
-in your <CODE>src/Configuration</CODE> into a <CODE>SharedModule</CODE>
-command (see <CODE>src/INSTALL</CODE> file). After a module is compiled into
-a DSO named <CODE>mod_foo.so</CODE> you can use <A
-HREF="mod/mod_so.html"><CODE>mod_so</CODE></A>'s <A
-HREF="mod/mod_so.html#loadmodule"><CODE>LoadModule</CODE></A> command in your
-<CODE>httpd.conf</CODE> file to load this module at server startup or restart.
-
-<P>To simplify this creation of DSO files for Apache modules (especially for
-third-party modules) a new support program named <CODE>apxs</CODE> (<EM>APache
-eXtenSion</EM>) is available. It can be used to build DSO based modules
-<EM>outside of</EM> the Apache source tree. The idea is simple: When
-installing Apache the <CODE>configure</CODE>'s <CODE>make install</CODE>
-procedure installs the Apache C header files and puts the platform-dependent
-compiler and linker flags for building DSO files into the <CODE>apxs</CODE>
-program. This way the user can use <CODE>apxs</CODE> to compile his Apache
-module sources without the Apache distribution source tree and without having
-to fiddle with the platform-dependent compiler and linker flags for DSO
-support.
-
-<P>To place the complete Apache core program into a DSO library (only required
-on some of the supported platforms to force the linker to export the apache
-core symbols -- a prerequisite for the DSO modularization) the rule
-<CODE>SHARED_CORE</CODE> has to be enabled via <CODE>configure</CODE>'s
-<CODE>--enable-rule=SHARED_CORE</CODE> option (see top-level
-<CODE>INSTALL</CODE> file) or by changing the <CODE>Rule</CODE> command in
-your <CODE>Configuration</CODE> file to <CODE>Rule SHARED_CORE=yes</CODE> (see
-<CODE>src/INSTALL</CODE> file). The Apache core code is then placed into a DSO
-library named <CODE>libhttpd.so</CODE>. Because one cannot link a DSO against
-static libraries on all platforms, an additional executable program named
-<CODE>libhttpd.ep</CODE> is created which both binds this static code and
-provides a stub for the <CODE>main()</CODE> function. Finally the
-<CODE>httpd</CODE> executable program itself is replaced by a bootstrapping
-code which automatically makes sure the Unix loader is able to load and start
-<CODE>libhttpd.ep</CODE> by providing the <CODE>LD_LIBRARY_PATH</CODE> to
-<CODE>libhttpd.so</CODE>.
-
-<H3>Supported Platforms</H3>
-
-<P>Apache's <CODE>src/Configure</CODE> script currently has only limited but
-adequate built-in knowledge on how to compile DSO files, because as already
-mentioned this is heavily platform-dependent. Nevertheless all major Unix
-platforms are supported. The definitive current state (May 1999) is this:
-
-<P>
-<UL>
-<LI>Out-of-the-box supported platforms:<BR>
-(actually tested versions in parenthesis)
-
-<PRE>
-o FreeBSD (2.1.5, 2.2.x, 3.x, 4.x)
-o OpenBSD (2.x)
-o NetBSD (1.3.1)
-o BSDI (3.x, 4.x)
-o Linux (Debian/1.3.1, RedHat/4.2)
-o Solaris (2.4, 2.5, 2.6, 2.7)
-o SunOS (4.1.3)
-o Digital UNIX (4.0)
-o IRIX (5.3, 6.2)
-o HP/UX (10.20)
-o UnixWare (2.01, 2.1.2)
-o SCO (5.0.4)
-o AIX (3.2, 4.1.5, 4.2, 4.3)
-o ReliantUNIX/SINIX (5.43)
-o SVR4 (-)
-o Mac OS X Server (1.0)
-o Mac OS (10.0 preview 1)
-o OpenStep/Mach (4.2)
-o DGUX (??)
-o NetWare (5.1)
-</PRE>
-
-<P>
-<LI> Explicitly unsupported platforms:
-
-<PRE>
-o Ultrix (no dlopen-style interface under this platform)
-</PRE>
-
-</UL>
-
-<H3>Usage Summary</H3>
-
-<P>To give you an overview of the DSO features of Apache 1.3, here is a short
-and concise summary:
-
-<OL>
-
-<LI>Placing the Apache core code (all the stuff which usually forms the
-<CODE>httpd</CODE> binary) into a DSO <CODE>libhttpd.so</CODE>, an executable
-program <CODE>libhttpd.ep</CODE> and a bootstrapping executable program
-<CODE>httpd</CODE> (Notice: this is only required on some of the supported
-platforms to force the linker to export the Apache core symbols, which in turn
-is a prerequisite for the DSO modularization):
-
-<P>
-<UL>
-<LI>Build and install via <CODE>configure</CODE> (preferred):
-<TABLE BGCOLOR="#f0f0f0" CELLPADDING=10><TR><TD>
-<PRE>
-$ ./configure --prefix=/path/to/install
- --enable-rule=SHARED_CORE ...
-$ make install
-</PRE>
-</TD></TR></TABLE>
-
-<LI>Build and install manually:
-<TABLE BGCOLOR="#f0f0f0" CELLPADDING=10><TR><TD>
-<PRE>
-- Edit src/Configuration:
- &lt;&lt; Rule SHARED_CORE=default
- &gt;&gt; Rule SHARED_CORE=yes
- &lt;&lt; EXTRA_CFLAGS=
- &gt;&gt; EXTRA_CFLAGS= -DSHARED_CORE_DIR=\"/path/to/install/libexec\"
-$ make
-$ cp src/libhttpd.so* /path/to/install/libexec/
-$ cp src/libhttpd.ep /path/to/install/libexec/
-$ cp src/httpd /path/to/install/bin/
-</PRE>
-</TD></TR></TABLE>
-</UL>
-
-<LI>Build and install a <EM>distributed</EM> Apache module, say
-<CODE>mod_foo.c</CODE>, into its own DSO <CODE>mod_foo.so</CODE>:
-
-<P>
-<UL>
-<LI>Build and install via <CODE>configure</CODE> (preferred):
-<TABLE BGCOLOR="#f0f0f0" CELLPADDING=10><TR><TD>
-<PRE>
-$ ./configure --prefix=/path/to/install
- --enable-shared=foo
-$ make install
-</PRE>
-</TD></TR></TABLE>
-
-<LI>Build and install manually:
-<TABLE BGCOLOR="#f0f0f0" CELLPADDING=10><TR><TD>
-<PRE>
-- Edit src/Configuration:
- &lt;&lt; AddModule modules/xxxx/mod_foo.o
- &gt;&gt; SharedModule modules/xxxx/mod_foo.so
-$ make
-$ cp src/xxxx/mod_foo.so /path/to/install/libexec
-- Edit /path/to/install/etc/httpd.conf
- &gt;&gt; LoadModule foo_module /path/to/install/libexec/mod_foo.so
-</PRE>
-</TD></TR></TABLE>
-</UL>
-
-<LI>Build and install a <EM>third-party</EM> Apache module, say
-<CODE>mod_foo.c</CODE>, into its own DSO <CODE>mod_foo.so</CODE>
-
-<P>
-<UL>
-<LI>Build and install via <CODE>configure</CODE> (preferred):
-<TABLE BGCOLOR="#f0f0f0" CELLPADDING=10><TR><TD>
-<PRE>
-$ ./configure --add-module=/path/to/3rdparty/mod_foo.c
- --enable-shared=foo
-$ make install
-</PRE>
-</TD></TR></TABLE>
-
-<LI>Build and install manually:
-<TABLE BGCOLOR="#f0f0f0" CELLPADDING=10><TR><TD>
-<PRE>
-$ cp /path/to/3rdparty/mod_foo.c /path/to/apache-1.3/src/modules/extra/
-- Edit src/Configuration:
- &gt;&gt; SharedModule modules/extra/mod_foo.so
-$ make
-$ cp src/xxxx/mod_foo.so /path/to/install/libexec
-- Edit /path/to/install/etc/httpd.conf
- &gt;&gt; LoadModule foo_module /path/to/install/libexec/mod_foo.so
-</PRE>
-</TD></TR></TABLE>
-</UL>
-
-<P>
-<LI>Build and install a <EM>third-party</EM> Apache module, say
-<CODE>mod_foo.c</CODE>, into its own DSO <CODE>mod_foo.so</CODE> <EM>outside
-of</EM> the Apache source tree:
-
-<P>
-<UL>
-<LI>Build and install via <CODE>apxs</CODE>:
-<TABLE BGCOLOR="#f0f0f0" CELLPADDING=10><TR><TD>
-<PRE>
-$ cd /path/to/3rdparty
-$ apxs -c mod_foo.c
-$ apxs -i -a -n foo mod_foo.so
-</PRE>
-</TD></TR></TABLE>
-</UL>
-
-</OL>
-
-<H3>Advantages & Disadvantages</H3>
-
-<P>The above DSO based features of Apache 1.3 have the following advantages:
-
-<UL>
-<LI> The server package is more flexible at run-time because the actual server
- process can be assembled at run-time via <A
- HREF="mod/mod_so.html#loadmodule"><CODE>LoadModule</CODE></A>
- <CODE>httpd.conf</CODE> configuration commands instead of
- <CODE>Configuration</CODE> <CODE>AddModule</CODE> commands at build-time.
- For instance this way one is able to run different server instances
- (standard &amp; SSL version, minimalistic &amp; powered up version
- [mod_perl, PHP3], <EM>etc.</EM>) with only one Apache installation.
-<P>
-<LI> The server package can be easily extended with third-party modules even
- after installation. This is at least a great benefit for vendor package
- maintainers who can create a Apache core package and additional packages
- containing extensions like PHP3, mod_perl, mod_fastcgi, <EM>etc.</EM>
-<P>
-<LI> Easier Apache module prototyping because with the DSO/<CODE>apxs</CODE>
- pair you can both work outside the Apache source tree and only need an
- <CODE>apxs -i</CODE> command followed by an <CODE>apachectl
- restart</CODE> to bring a new version of your currently developed module
- into the running Apache server.
-</UL>
-
-<P>DSO has the following disadvantages:
-
-<UL>
-<LI> The DSO mechanism cannot be used on every platform because not all
- operating systems support dynamic loading of code into the address space
- of a program.
-<P>
-<LI> The server is approximately 20% slower at startup time because of the
- symbol resolving overhead the Unix loader now has to do.
-<P>
-<LI> The server is approximately 5% slower at execution time under some
- platforms because position independent code (PIC) sometimes needs
- complicated assembler tricks for relative addressing which are not
- necessarily as fast as absolute addressing.
-<P>
-<LI> Because DSO modules cannot be linked against other DSO-based libraries
- (<CODE>ld -lfoo</CODE>) on all platforms (for instance a.out-based
- platforms usually don't provide this functionality while ELF-based
- platforms do) you cannot use the DSO mechanism for all types of modules.
- Or in other words, modules compiled as DSO files are restricted to only
- use symbols from the Apache core, from the C library (<CODE>libc</CODE>)
- and all other dynamic or static libraries used by the Apache core, or
- from static library archives (<CODE>libfoo.a</CODE>) containing position
- independent code. The only chances to use other code is to either make
- sure the Apache core itself already contains a reference to it, loading
- the code yourself via <CODE>dlopen()</CODE> or enabling the
- <CODE>SHARED_CHAIN</CODE> rule while building Apache when your platform
- supports linking DSO files against DSO libraries.
-<P>
-<LI> Under some platforms (many SVR4 systems) there is no way to force the
- linker to export all global symbols for use in DSO's when linking the
- Apache httpd executable program. But without the visibility of the Apache
- core symbols no standard Apache module could be used as a DSO. The only
- chance here is to use the <CODE>SHARED_CORE</CODE> feature because this
- way the global symbols are forced to be exported. As a consequence the
- Apache <CODE>src/Configure</CODE> script automatically enforces
- <CODE>SHARED_CORE</CODE> on these platforms when DSO features are used in
- the <CODE>Configuration</CODE> file or on the configure command line.
-</UL>
-
-<!--#include virtual="footer.html" -->
-</BLOCKQUOTE>
-</BODY>
-</HTML>
diff --git a/docs/manual/handler.html.en b/docs/manual/handler.html.en
deleted file mode 100644
index 72f16fd170..0000000000
--- a/docs/manual/handler.html.en
+++ /dev/null
@@ -1,195 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<HTML>
-<HEAD>
-<TITLE>Apache's Handler Use</TITLE>
-</HEAD>
-
-<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
-<BODY
- BGCOLOR="#FFFFFF"
- TEXT="#000000"
- LINK="#0000FF"
- VLINK="#000080"
- ALINK="#FF0000"
->
-<!--#include virtual="header.html" -->
-<H1 ALIGN="CENTER">Apache's Handler Use</H1>
-
-<H2>What is a Handler</H2>
-
-<P>A "handler" is an internal Apache representation of the action to be
-performed when a file is called. Generally, files have implicit
-handlers, based on the file type. Normally, all files are simply
-served by the server, but certain file typed are "handled"
-separately. For example, you may use a type of
-"application/x-httpd-cgi" to invoke CGI scripts.</P>
-
-<P>Apache 1.1 adds the additional ability to use handlers
-explicitly. Either based on filename extensions or on location, these
-handlers are unrelated to file type. This is advantageous both because
-it is a more elegant solution, but it also allows for both a type
-<STRONG>and</STRONG> a handler to be associated with a file (See also
-<A HREF="mod/mod_mime.html#multipleext">Files with Multiple Extensions</A>)
-
-</P>
-
-<P>Handlers can either be built into the server or to a module, or
-they can be added with the <A
-HREF="mod/mod_actions.html#action">Action</A> directive. The built-in
-handlers in the standard distribution are as follows:</P>
-
-<UL>
-<LI><STRONG>default-handler</STRONG>:
- Send the file using the <CODE>default_handler()</CODE>, which is the
- handler used by default to handle static content.
- (core)
-<LI><STRONG>send-as-is</STRONG>:
- Send file with HTTP headers as is.
- (<A HREF="mod/mod_asis.html">mod_asis</A>)
-<LI><STRONG>cgi-script</STRONG>:
- Treat the file as a CGI script.
- (<A HREF="mod/mod_cgi.html">mod_cgi</A>)
-<LI><STRONG>imap-file</STRONG>:
- Imagemap rule file.
- (<A HREF="mod/mod_imap.html">mod_imap</A>)
-<LI><STRONG>server-info</STRONG>:
- Get the server's configuration information
- (<A HREF="mod/mod_info.html">mod_info</A>)
-<LI><STRONG>server-parsed</STRONG>:
- Parse for server-side includes
- (<A HREF="mod/mod_include.html">mod_include</A>)
-<LI><STRONG>server-status</STRONG>:
- Get the server's status report
- (<A HREF="mod/mod_status.html">mod_status</A>)
-<LI><STRONG>type-map</STRONG>:
- Parse as a type map file for content negotiation
- (<A HREF="mod/mod_negotiation.html">mod_negotiation</A>)
-</UL>
-
-<P>
-
-<H2>Directives</H2>
-<UL>
-<LI><A HREF="#addhandler">AddHandler</A>
-<LI><A HREF="#sethandler">SetHandler</A>
-</UL>
-
-<HR>
-
-<H2><A NAME="addhandler">AddHandler</A></H2>
-
-<A
- HREF="mod/directive-dict.html#Syntax"
- REL="Help"
-><STRONG>Syntax:</STRONG></A> AddHandler <EM>handler-name extension extension...</EM><BR>
-<A
- HREF="mod/directive-dict.html#Context"
- REL="Help"
-><STRONG>Context:</STRONG></A> server config, virtual host, directory, .htaccess<BR>
-<A
- HREF="mod/directive-dict.html#Override"
- REL="Help"
-><STRONG>Override:</STRONG></A> FileInfo<BR>
-<A
- HREF="mod/directive-dict.html#Status"
- REL="Help"
-><STRONG>Status:</STRONG></A> Base<BR>
-<A
- HREF="mod/directive-dict.html#Module"
- REL="Help"
-><STRONG>Module:</STRONG></A> mod_mime<BR>
-<A
- HREF="mod/directive-dict.html#Compatibility"
- REL="Help"
-><STRONG>Compatibility:</STRONG></A> AddHandler is only available in Apache
-1.1 and later<P>
-
-<P>AddHandler maps the filename extensions <EM>extension</EM> to the
-handler <EM>handler-name</EM>. This mapping is added to any already
-in force, overriding any mappings that already exist for the same
-<EM>extension</EM>.
-
-For example, to activate CGI scripts
-with the file extension "<CODE>.cgi</CODE>", you might use:
-<PRE>
- AddHandler cgi-script cgi
-</PRE>
-
-<P>Once that has been put into your srm.conf or httpd.conf file, any
-file containing the "<CODE>.cgi</CODE>" extension will be treated as a
-CGI program.</P>
-
-<P>
-
-<STRONG>See also</STRONG>: <A HREF="mod/mod_mime.html#multipleext">Files with
-multiple extensions</A>
-
-<HR>
-
-<H2><A NAME="sethandler">SetHandler</A></H2>
-
-<A
- HREF="mod/directive-dict.html#Syntax"
- REL="Help"
-><STRONG>Syntax:</STRONG></A> SetHandler <EM>handler-name</EM><BR>
-<A
- HREF="mod/directive-dict.html#Context"
- REL="Help"
-><STRONG>Context:</STRONG></A> directory, .htaccess<BR>
-<A
- HREF="mod/directive-dict.html#Status"
- REL="Help"
-><STRONG>Status:</STRONG></A> Base<BR>
-<A
- HREF="mod/directive-dict.html#Module"
- REL="Help"
-><STRONG>Module:</STRONG></A> mod_mime<BR>
-<A
- HREF="mod/directive-dict.html#Compatibility"
- REL="Help"
-><STRONG>Compatibility:</STRONG></A> SetHandler is only available in Apache
-1.1 and later.<P>
-
-<P>When placed into an <CODE>.htaccess</CODE> file or a
-<CODE>&lt;Directory&gt;</CODE> or <CODE>&lt;Location&gt;</CODE>
-section, this directive forces all matching files to be parsed through
-the handler given by <EM>handler-name</EM>. For example, if you had a
-directory you wanted to be parsed entirely as imagemap rule files,
-regardless of extension, you might put the following into an
-<CODE>.htaccess</CODE> file in that directory:
-<PRE>
- SetHandler imap-file
-</PRE>
-
-<P>Another example: if you wanted to have the server display a status
-report whenever a URL of <CODE>http://servername/status</CODE> was
-called, you might put the following into access.conf:
-<PRE>
- &lt;Location /status&gt;
- SetHandler server-status
- &lt;/Location&gt;
-</PRE>
-<HR>
-
-<H2>Programmer's Note</H2>
-
-<P>In order to implement the handler features, an addition has been
-made to the <A HREF="misc/API.html">Apache API</A> that you may wish to
-make use of. Specifically, a new record has been added to the
-<CODE>request_rec</CODE> structure:</P>
-<PRE>
- char *handler
-</PRE>
-<P>If you wish to have your module engage a handler, you need only to
-set <CODE>r-&gt;handler</CODE> to the name of the handler at any time
-prior to the <CODE>invoke_handler</CODE> stage of the
-request. Handlers are implemented as they were before, albeit using
-the handler name instead of a content type. While it is not
-necessary, the naming convention for handlers is to use a
-dash-separated word, with no slashes, so as to not invade the media
-type name-space.</P>
-
-<!--#include virtual="footer.html" -->
-</BODY>
-</HTML>
-
diff --git a/docs/manual/index.html.en b/docs/manual/index.html.en
deleted file mode 100644
index beba6927a4..0000000000
--- a/docs/manual/index.html.en
+++ /dev/null
@@ -1,65 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<HTML>
-<HEAD>
-<TITLE>Apache 2.0 documentation</TITLE>
-</HEAD>
-
-<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
-<BODY
- BGCOLOR="#FFFFFF"
- TEXT="#000000"
- LINK="#0000FF"
- VLINK="#000080"
- ALINK="#FF0000"
->
-<!--#include virtual="header.html" -->
-<H1 ALIGN="CENTER">Apache 2.0 User's Guide</H1>
-
-<HR>
-
-<H3><A NAME="new">Release Notes</A></H3>
-<UL>
-<LI><A HREF="new_features_2_0.html">New features in Apache 2.0</A>
-<LI><A HREF="LICENSE">Apache License</A>
-</UL>
-
-<H3><A NAME="ref">Apache Reference Manual</A></H3>
-
-<UL>
-<LI><A HREF="http://www.apache.org/search.html">
- <STRONG>Search</STRONG></A> for key words
-<LI><A HREF="install.html">Compiling and Installing</A>
-<LI><A HREF="invoking.html">Starting</A>
-<LI><A HREF="stopping.html">Stopping or Restarting</A>
-<LI><A HREF="mod/directives.html">Run-time configuration directives</A>
-<LI><A HREF="mod/index.html">Modules</A>
-<LI><A HREF="vhosts/index.html">Virtual Hosts</A>
-<LI><A HREF="dso.html">Dynamic Shared Object (DSO) support</A>
-<LI><A HREF="handler.html">Handlers</A>
-<LI><A HREF="content-negotiation.html">Content negotiation</A>
-<LI><A HREF="env.html">Special purpose environment variables</A>
-<LI><A HREF="misc/API.html">The Apache API</A>
-<LI><A HREF="suexec.html">Using SetUserID Execution for CGI</A>
-</UL>
-
-<H3><A NAME="oth">Other Notes</A></H3>
-<UL>
-<LI><A HREF="misc/FAQ.html">Frequently Asked Questions</A>
-<LI><A HREF="misc/rewriteguide.html">URL Rewriting Guide</A>
-<LI><A HREF="misc/perf-tuning.html">General Performance hints</A> for
-getting the best performance out of Apache
-<LI><A HREF="misc/perf.html">OS Specific Performance hints</A> to help
-fine-tune specific platforms
-<LI><A HREF="misc/security_tips.html">Security tips</A>
-<LI><A HREF="misc/compat_notes.html">Compatibility Notes with NCSA httpd</A>
-<LI><A HREF="misc/howto.html">How do I? documentation</A>
-<LI><A HREF="misc/fin_wait_2.html">Discussion of the FIN_WAIT_2 problem</A>
-<LI><A HREF="misc/known_client_problems.html">Known problems with various
- clients</A>
-<LI><A HREF="developer/index.html">Documentation for Apache developers</A>
-</UL>
-
-<!--#include virtual="footer.html" -->
-</BODY>
-</HTML>
-
diff --git a/docs/manual/install.html.en b/docs/manual/install.html.en
deleted file mode 100644
index b8f5047e00..0000000000
--- a/docs/manual/install.html.en
+++ /dev/null
@@ -1,270 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<HTML>
-<HEAD>
-<TITLE>Compiling and Installing Apache</TITLE>
-</HEAD>
-
-<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
-<BODY
- BGCOLOR="#FFFFFF"
- TEXT="#000000"
- LINK="#0000FF"
- VLINK="#000080"
- ALINK="#FF0000"
->
-<!--#include virtual="header.html" -->
-
-<H1 ALIGN="CENTER">Compiling and Installing Apache 1.3</H1>
-
-This document covers compilation and installation of Apache on Unix
-systems only. For compiling and installation on Windows, see <A
-HREF="windows.html">Using Apache with Microsoft Windows</A> and for
-TPF see <A HREF="install-tpf.html">Installing the Apache 1.3 HTTP
-Server on TPF</A>.
-
-<P>
-
-UnixWare users will want to consult <A HREF="unixware.html">build notes</A>
-for various UnixWare versions before compiling.
-
-<H2>Downloading Apache</H2>
-
-Information on the latest version of Apache can be found on the Apache
-web server at <A
-HREF="http://www.apache.org/">http://www.apache.org/</A>. This will
-list the current release, any more recent beta-test release, together
-with details of mirror web and anonymous ftp sites.
-
-<P>
-
-If you downloaded a binary distribution, skip to <A
-HREF="#install">Installing Apache</A>. Otherwise read the next section
-for how to compile the server.
-
-<H2>Compiling Apache</H2>
-
-Compiling Apache consists of three steps: Firstly select which Apache
-<STRONG>modules</STRONG> you want to include into the server. Secondly create a
-configuration for your operating system. Thirdly compile the
-executable.
-<P>
-
-All configuration of Apache is performed in the <CODE>src</CODE>
-directory of the Apache distribution. Change into this directory.
-
-<OL>
- <LI>
- Select modules to compile into Apache in the
- <CODE>Configuration</CODE> file. Uncomment lines corresponding to
- those optional modules you wish to include (among the AddModule lines
- at the bottom of the file), or add new lines corresponding to
- additional modules you have downloaded or written. (See <A
- HREF="misc/API.html">API.html</A> for preliminary docs on how to
- write Apache modules). Advanced users can comment out some of the
- default modules if they are sure they will not need them (be careful
- though, since many of the default modules are vital for the correct
- operation and security of the server).
- <P>
-
- You should also read the instructions in the <CODE>Configuration</CODE>
- file to see if you need to set any of the <CODE>Rule</CODE> lines.
-
-
- <LI>
- Configure Apache for your operating system. Normally you can just
- type run the <CODE>Configure</CODE> script as given below. However
- if this fails or you have any special requirements (<EM>e.g.</EM>, to include
- an additional library required by an optional module) you might need
- to edit one or more of the following options in the
- <CODE>Configuration</CODE> file:
- <CODE>EXTRA_CFLAGS, LIBS, LDFLAGS, INCLUDES</CODE>.
- <P>
-
- Run the <CODE>Configure</CODE> script:
- <BLOCKQUOTE>
- <PRE>
- % Configure
- Using 'Configuration' as config file
- + configured for &lt;whatever&gt; platform
- + setting C compiler to &lt;whatever&gt; *
- + setting C compiler optimization-level to &lt;whatever&gt; *
- + Adding selected modules
- + doing sanity check on compiler and options
- Creating Makefile in support
- Creating Makefile in main
- Creating Makefile in os/unix
- Creating Makefile in modules/standard
- </PRE>
- </BLOCKQUOTE>
-
- (*: Depending on Configuration and your system, Configure
- might not print these lines. That's OK).<P>
-
- This generates a Makefile for use in stage 3. It also creates a
- Makefile in the support directory, for compilation of the optional
- support programs.
- <P>
-
- (If you want to maintain multiple configurations, you can give a
- option to <CODE>Configure</CODE> to tell it to read an alternative
- Configuration file, such as <CODE>Configure -file
- Configuration.ai</CODE>).
- <P>
-
- <LI>
- Type <CODE>make</CODE>.
-</OL>
-
-The modules we place in the Apache distribution are the ones we have
-tested and are used regularly by various members of the Apache
-development group. Additional modules contributed by members or third
-parties with specific needs or functions are available at
-&lt;<A HREF="http://www.apache.org/dist/contrib/modules/"
- >http://www.apache.org/dist/contrib/modules/</A>&gt;.
-There are instructions on that page for linking these modules into the
-core Apache code.
-
-<H2><A NAME="install">Installing Apache</A></H2>
-
-You will have a binary file called <CODE>httpd</CODE> in the
-<CODE>src</CODE> directory. A binary distribution of Apache will
-supply this file. <P>
-
-The next step is to install the program and configure it. Apache is
-designed to be configured and run from the same set of directories
-where it is compiled. If you want to run it from somewhere else, make
-a directory and copy the <CODE>conf</CODE>, <CODE>logs</CODE> and
-<CODE>icons</CODE> directories into it. In either case you should
-read the <A HREF="misc/security_tips.html#serverroot">security tips</A>
-describing how to set the permissions on the server root directory.<P>
-
-The next step is to edit the configuration files for the server. This
-consists of setting up various <STRONG>directives</STRONG> in up to three
-central configuration files. By default, these files are located in
-the <CODE>conf</CODE> directory and are called <CODE>srm.conf</CODE>,
-<CODE>access.conf</CODE> and <CODE>httpd.conf</CODE>. To help you get
-started there are same files in the <CODE>conf</CODE> directory of the
-distribution, called <CODE>srm.conf-dist</CODE>,
-<CODE>access.conf-dist</CODE> and <CODE>httpd.conf-dist</CODE>. Copy
-or rename these files to the names without the <CODE>-dist</CODE>.
-Then edit each of the files. Read the comments in each file carefully.
-Failure to setup these files correctly could lead to your server not
-working or being insecure. You should also have an additional file in
-the <CODE>conf</CODE> directory called <CODE>mime.types</CODE>. This
-file usually does not need editing.
-
-<P>
-
-First edit <CODE>httpd.conf</CODE>. This sets up general attributes
-about the server: the port number, the user it runs as, <EM>etc.</EM> Next
-edit the <CODE>srm.conf</CODE> file; this sets up the root of the
-document tree, special functions like server-parsed HTML or internal
-imagemap parsing, <EM>etc.</EM> Finally, edit the <CODE>access.conf</CODE>
-file to at least set the base cases of access.
-
-<P>
-
-In addition to these three files, the server behavior can be configured
-on a directory-by-directory basis by using <CODE>.htaccess</CODE>
-files in directories accessed by the server.
-
-<H3>Set your system time properly!</H3>
-
-Proper operation of a public web server requires accurate time
-keeping, since elements of the HTTP protocol are expressed as the time
-of day. So, it's time to investigate setting up NTP or some other
-time synchronization system on your Unix box, or whatever the
-equivalent on NT would be.
-
-<H3>Starting and Stopping the Server</H3>
-
-To start the server, simply run <CODE>httpd</CODE>. This will look for
-<CODE>httpd.conf</CODE> in the location compiled into the code (by
-default <CODE>/usr/local/apache/conf/httpd.conf</CODE>). If
-this file is somewhere else, you can give the real
-location with the -f argument. For example:
-
-<PRE>
- /usr/local/apache/httpd -f /usr/local/apache/conf/httpd.conf
-</PRE>
-
-If all goes well this will return to the command prompt almost
-immediately. This indicates that the server is now up and running. If
-anything goes wrong during the initialization of the server you will
-see an error message on the screen.
-
-If the server started ok, you can now use your browser to
-connect to the server and read the documentation. If you are running
-the browser on the same machine as the server and using the default
-port of 80, a suitable URL to enter into your browser is
-
-<PRE>
- http://localhost/
-</PRE>
-
-<P>
-
-Note that when the server starts it will create a number of
-<EM>child</EM> processes to handle the requests. If you started Apache
-as the root user, the parent process will continue to run as root
-while the children will change to the user as given in the httpd.conf
-file.
-
-<P>
-
-If when you run <CODE>httpd</CODE> it complained about being unable to
-"bind" to an address, then either some other process is already using
-the port you have configured Apache to use, or you are running httpd
-as a normal user but trying to use a port below 1024 (such as the
-default port 80).
-
-<P>
-
-If the server is not running, read the error message displayed
-when you run httpd. You should also check the server
-error_log for additional information (with the default configuration,
-this will be located in the file <CODE>error_log</CODE> in the
-<CODE>logs</CODE> directory).
-
-<P>
-
-If you want your server to continue running after a system reboot, you
-should add a call to <CODE>httpd</CODE> to your system startup files
-(typically <CODE>rc.local</CODE> or a file in an
-<CODE>rc.<EM>N</EM></CODE> directory). This will start Apache as root.
-Before doing this ensure that your server is properly configured
-for security and access restrictions.
-
-<P>
-
-To stop Apache send the parent process a TERM signal. The PID of this
-process is written to the file <CODE>httpd.pid</CODE> in the
-<CODE>logs</CODE> directory (unless configured otherwise). Do not
-attempt to kill the child processes because they will be renewed by
-the parent. A typical command to stop the server is:
-
-<PRE>
- kill -TERM `cat /usr/local/apache/logs/httpd.pid`
-</PRE>
-
-<P>
-
-For more information about Apache command line options, configuration
-and log files, see <A HREF="invoking.html">Starting Apache</A>. For a
-reference guide to all Apache directives supported by the distributed
-modules, see the <A HREF="mod/directives.html">Apache directives</A>.
-
-<H2>Compiling Support Programs</H2>
-
-In addition to the main <CODE>httpd</CODE> server which is compiled
-and configured as above, Apache includes a number of support programs.
-These are not compiled by default. The support programs are in the
-<CODE>support</CODE> directory of the distribution. To compile
-the support programs, change into this directory and type
-<PRE>
- make
-</PRE>
-
-<!--#include virtual="footer.html" -->
-</BODY>
-</HTML>
diff --git a/docs/manual/invoking.html.en b/docs/manual/invoking.html.en
deleted file mode 100644
index 02ee07659f..0000000000
--- a/docs/manual/invoking.html.en
+++ /dev/null
@@ -1,220 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<HTML>
-<HEAD>
-<TITLE>Starting Apache</TITLE>
-</HEAD>
-
-<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
-<BODY
- BGCOLOR="#FFFFFF"
- TEXT="#000000"
- LINK="#0000FF"
- VLINK="#000080"
- ALINK="#FF0000"
->
-<!--#include virtual="header.html" -->
-<H1 ALIGN="CENTER">Starting Apache</H1>
-
-<H2>Invoking Apache</H2>
-
-On Unix, the <CODE>httpd</CODE> program is usually run as a daemon
-which executes continuously, handling requests. It is possible to
-invoke Apache by the Internet daemon <CODE>inetd</CODE> each time a
-connection to the HTTP service is made (use the <A
-HREF="mod/core.html#servertype">ServerType</A> directive) but this is
-not recommended.
-
-<P>
-
-On Windows, Apache is normally run as a service on Windows NT, or as a
-console application on Windows 95. See also <A
-HREF="windows.html#run">running Apache for Windows</A>.
-
-<H2>Command line options</H2>
-The following options are recognized on the httpd command line:
-<DL>
-<DT><CODE>-d</CODE> <EM>serverroot</EM>
-<DD>Set the initial value for the
-<A HREF="mod/core.html#serverroot">ServerRoot</A> variable to
-<EM>serverroot</EM>. This can be overridden by the ServerRoot command
-in the configuration file. The default is
-<CODE>/usr/local/apache</CODE> on Unix, <CODE>/apache</CODE> on
-Windows and <CODE>/os2httpd</CODE> on OS/2.
-
-<DT><CODE>-D</CODE> <EM>name</EM>
-<DD>Define a name for use in in
-<A HREF="mod/core.html#ifdefine">IfDefine</A> directives.
-This option can be used to optionally enable certain functionality in the
-configuration file, or to use a common configuration for
-several independent hosts, where host specific information is enclosed in
-&lt;IfDefine&gt; sections.
-
-<DT><CODE>-f</CODE> <EM>config</EM>
-<DD>Execute the commands in the file <EM>config</EM> on startup. If
-<EM>config</EM> does not begin with a <CODE>/</CODE>, then it is taken to be a
-path relative to the <A HREF="mod/core.html#serverroot">ServerRoot</A>. The
-default is <CODE>conf/httpd.conf</CODE>.
-
-<DT><CODE>-C</CODE> <EM>"directive"</EM>
-<DD>Process the given apache "directive" (just as if it had been part of a
-configuration file) <STRONG>before</STRONG> actually reading the regular configuration files.
-
-<DT><CODE>-c</CODE> <EM>"directive"</EM>
-<DD>Process the given apache "directive" <STRONG>after</STRONG> reading
-all the regular configuration files.
-
-<DT><CODE>-X</CODE>
-<DD>Run in single-process mode, for internal debugging purposes only; the
-daemon does not detach from the terminal or fork any children. Do <EM>NOT</EM>
-use this mode to provide ordinary web service.
-
-<DT><CODE>-v</CODE>
-<DD>Print the version of httpd and its build date, and then exit.
-
-<DT><A NAME="version"><CODE>-V</CODE></A>
-<DD>Print the base version of httpd, its
-build date, and a list of compile time settings which influence the
-behavior and performance of the apache server (<EM>e.g.</EM>,
-<SAMP>-DUSE_MMAP_FILES</SAMP>),
-then exit.
-
-<DT><A NAME="help"><CODE>-L</CODE></A>
-<DD>
-
-Give a list of directives together with expected arguments and places
-where the directive is valid, then exit. (Apache 1.3.4 and
-later. Earlier versions used -l instead).
-
-
-<DT><CODE>-l</CODE></A>
-<DD>
-
-Give a list of all modules compiled into the server, then exit.
-(Apache 1.3.4 and later. Earlier versions used -h instead).<br>
-
-Give a list of directives together with expected arguments and places
-where the directive is valid, then exit. (Apache 1.2 to 1.3.3. Later
-versions use -L instead).
-
-
-
-<DT><CODE>-h</CODE>
-<DD>
-
-Print a list of the httpd options, then exit. (Apache 1.3.4 and
-later. Earlier versions used -? instead).<br>
-
-Give a list of all modules compiled into the server, then exit. (Up to
-Apache 1.3.3. Later versions use -l instead).<br>
-
-
-<DT><CODE>-S</CODE>
-<DD>Show the settings as parsed from the config file (currently only
-shows a breakdown of the vhost settings) but do not start the
-server. (Up to Apache 1.3.3, this option also started the server).
-
-<DT><CODE>-t</CODE>
-<DD>Test the configuration file syntax (<EM>i.e.</EM>, read all configuration files
-and interpret them) but do not start the server. If the configuration contains
-errors, display an error message and exit with a non-zero exit status,
-otherwise display "Syntax OK" and terminate with a zero exit status. This
-command checks to see if all DocumentRoot entries exist and are directories.
-For sites with many vhosts, this is expensive; consider the <CODE>-T</CODE>
-command instead.
-
-<DT><CODE>-T</CODE>
-<DD>Test the configuration file syntax (<EM>i.e.</EM>, read all configuration files
-and interpret them) but do not start the server. If the configuration contains
-errors, display an error message and exit with a non-zero exit status,
-otherwise display "Syntax OK" and terminate with a zero exit status. This
-command does not perform any checking of the DocumentRoot entries.
-
-<DT><CODE>-k</CODE> <EM>option</EM>
-<DD>Windows only: signal Apache to restart or shutdown. <EM>option</EM>
-is one of "shutdown" or "restart". (Apache 1.3.3 and later).
-
-<DT><CODE>-?</CODE>
-<DD>Print a list of the httpd options, and then exit (up to Apache
-1.3.3. Later version use -h instead).
-
-</DL>
-
-<H2>Configuration files</H2>
-The server will read three files for configuration directives. Any
-directive may appear in any of these files. The the names of these
-files are taken to be relative to the server root; this is set by the
-<A HREF="mod/core.html#serverroot">ServerRoot</A> directive, the
-<CODE>-d</CODE> command line flag, or (on Windows only) the registry
-(see <A HREF="windows.html#run">Running Apache for Windows</A>).
-
-Conventionally, the files are:
-<DL>
-<DT><CODE>conf/httpd.conf</CODE>
-<DD>Contains directives that control the operation of the server daemon.
-The filename may be overridden with the <CODE>-f</CODE> command line flag.
-
-<DT><CODE>conf/srm.conf</CODE>
-<DD>Contains directives that control the specification of documents that
-the server can provide to clients. The filename may be overridden with
-the <A HREF="mod/core.html#resourceconfig">ResourceConfig</A> directive.
-
-<DT><CODE>conf/access.conf</CODE>
-<DD>Contains directives that control access to documents.
-The filename may be overridden with the
-<A HREF="mod/core.html#accessconfig">AccessConfig</A> directive.
-</DL>
-However, these conventions need not be adhered to.
-<P>
-The server also reads a file containing mime document types; the filename
-is set by the <A HREF="mod/mod_mime.html#typesconfig">TypesConfig</A>
-directive,
-and is <CODE>conf/mime.types</CODE> by default.
-
-<H2>Log files</H2>
-<H3>security warning</H3>
-Anyone who can write to the directory where Apache is writing a
-log file can almost certainly gain access to the uid that the server is
-started as, which is normally root. Do <EM>NOT</EM> give people write
-access to the directory the logs are stored in without being aware of
-the consequences; see the <A HREF="misc/security_tips.html">security tips</A>
-document for details.
-<H3>pid file</H3>
-
-On startup, Apache saves the process id of the parent httpd process to
-the file <CODE>logs/httpd.pid</CODE>. This filename can be changed
-with the <A HREF="mod/core.html#pidfile">PidFile</A> directive. The
-process-id is for use by the administrator in restarting and
-terminating the daemon: on Unix, a HUP or USR1 signal causes the
-daemon to re-read its configuration files and a TERM signal causes it
-to die gracefully; on Windows, use the -k command line option instead.
-For more information see the <A HREF="stopping.html">Stopping and
-Restarting</A> page.
-
-<P>
-If the process dies (or is killed) abnormally, then it will be necessary to
-kill the children httpd processes.
-
-<H3>Error log</H3>
-
-The server will log error messages to a log file, by default
-<CODE>logs/error_log</CODE> on Unix or <CODE>logs/error.log</CODE> on
-Windows and OS/2. The filename can be set using the <A
-HREF="mod/core.html#errorlog">ErrorLog</A> directive; different error
-logs can be set for different <A
-HREF="mod/core.html#virtualhost">virtual hosts</A>.
-
-<H3>Transfer log</H3>
-
-The server will typically log each request to a transfer file, by
-default <CODE>logs/access_log</CODE> on Unix or
-<CODE>logs/access.log</CODE> on Windows and OS/2. The filename can be
-set using a <A
-HREF="mod/mod_log_config.html#transferlog">TransferLog</A> directive
-or additional log files created with the <A
-HREF="mod/mod_log_config.html#customlog">CustomLog</A> directive;
-different transfer logs can be set for different <A
-HREF="mod/core.html#virtualhost">virtual hosts</A>.
-
-<!--#include virtual="footer.html" -->
-</BODY>
-</HTML>
diff --git a/docs/manual/mod/directive-dict.html.en b/docs/manual/mod/directive-dict.html.en
deleted file mode 100644
index 03a9c3f67e..0000000000
--- a/docs/manual/mod/directive-dict.html.en
+++ /dev/null
@@ -1,265 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<HTML>
- <HEAD>
- <TITLE>Definitions of terms used to describe Apache directives
- </TITLE>
- </HEAD>
-<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
- <BODY
- BGCOLOR="#FFFFFF"
- TEXT="#000000"
- LINK="#0000FF"
- VLINK="#000080"
- ALINK="#FF0000"
- >
-<!--#include virtual="header.html" -->
- <H1 ALIGN="CENTER">Terms Used to Describe Apache Directives</H1>
-
- <P>
- Each Apache configuration directive is described using a common format
- that looks like this:
- </P>
- <DL>
- <DD><A
- HREF="#Syntax"
- REL="Help"
- ><STRONG>Syntax:</STRONG></A> <EM>directive-name</EM> <EM>some args</EM>
- <BR>
- <A
- HREF="#Default"
- REL="Help"
- ><STRONG>Default:</STRONG></A>
- <SAMP><EM>directive-name default-value</EM></SAMP>
- <BR>
- <A
- HREF="#Context"
- REL="Help"
- ><STRONG>Context:</STRONG></A> <EM>context-list</EM>
- <BR>
- <A
- HREF="#Override"
- REL="Help"
- ><STRONG>Override:</STRONG></A> <EM>override</EM>
- <BR>
- <A
- HREF="#Status"
- REL="Help"
- ><STRONG>Status:</STRONG></A> <EM>status</EM>
- <BR>
- <A
- HREF="#Module"
- REL="Help"
- ><STRONG>Module:</STRONG></A> <EM>module-name</EM>
- <BR>
- <A
- HREF="#Compatibility"
- REL="Help"
- ><STRONG>Compatibility:</STRONG></A> <EM>compatibility notes</EM>
- </DD>
- </DL>
- <P>
- Each of the directive's attributes, complete with possible values
- where possible, are described in this document.
- </P>
-
- <H2>Directive Terms</H2>
- <UL>
- <LI><A HREF="#Syntax">Syntax</A>
- </LI>
- <LI><A HREF="#Default">Default</A>
- </LI>
- <LI><A HREF="#Context">Context</A>
- </LI>
- <LI><A HREF="#Override">Override</A>
- </LI>
- <LI><A HREF="#Status">Status</A>
- </LI>
- <LI><A HREF="#Module">Module</A>
- </LI>
- <LI><A HREF="#Compatibility">Compatibility</A>
- </LI>
- </UL>
-
- <HR>
- <H2><A NAME="Syntax">Syntax</A></H2>
- <P>
- This indicates the format of the directive as it would appear in a
- configuration file. This syntax is extremely directive-specific, so
- refer to the text of the directive's description for details.
- </P>
-
- <HR>
- <H2><A NAME="Default">Default</A></H2>
- <P>
- If the directive has a default value (<EM>i.e.</EM>, if you omit it
- from your configuration entirely, the Apache Web server will behave as
- though you set it to a particular value), it is described here. If
- there is no default value, this section should say
- &quot;<EM>None</EM>&quot;.
- </P>
-
- <HR>
- <H2><A NAME="Context">Context</A></H2>
- <P>
- This indicates where in the server's configuration files the directive
- is legal. It's a comma-separated list of one or more of the following
- values:
- </P>
- <DL>
- <DT><STRONG>server config</STRONG>
- </DT>
- <DD>This means that the directive may be used in the server
- configuration files (<EM>e.g.</EM>, <SAMP>httpd.conf</SAMP>,
- <SAMP>srm.conf</SAMP>, and <SAMP>access.conf</SAMP>), but
- <STRONG>not</STRONG> within any <SAMP>&lt;VirtualHost&gt;</SAMP> or
- &lt;Directory&gt; containers. It is not allowed in
- <SAMP>.htaccess</SAMP> files at all.
- <P>
- </P>
- </DD>
- <DT><STRONG>virtual host</STRONG>
- </DT>
- <DD>This context means that the directive may appear inside
- <SAMP>&lt;VirtualHost&gt;</SAMP> containers in the server
- configuration files.
- <P>
- </P>
- </DD>
- <DT><STRONG>directory</STRONG>
- </DT>
- <DD>A directive marked as being valid in this context may be used
- inside <SAMP>&lt;Directory&gt;</SAMP>,
- <SAMP>&lt;Location&gt;</SAMP>, and <SAMP>&lt;Files&gt;</SAMP>
- containers in the server configuration files, subject to the
- restrictions outlined in <A HREF="../sections.html">How Directory,
- Location and Files sections work</A>.
- <P>
- </P>
- </DD>
- <DT><STRONG>.htaccess</STRONG>
- </DT>
- <DD>If a directive is valid in this context, it means that it can
- appear inside <EM>per</EM>-directory <SAMP>.htaccess</SAMP> files.
- It may not be processed, though depending upon the
- <A
- HREF="#Override"
- REL="Help"
- >overrides</A>
- currently active.
- <P>
- </P>
- </DD>
- </DL>
- <P>
- The directive is <EM>only</EM> allowed within the designated context;
- if you try to use it elsewhere, you'll get a configuration error that
- will either prevent the server from handling requests in that context
- correctly, or will keep the server from operating at all --
- <EM>i.e.</EM>, the server won't even start.
- </P>
- <P>
- The valid locations for the directive are actually the result of a
- Boolean OR of all of the listed contexts. In other words, a directive
- that is marked as being valid in &quot;<SAMP>server config,
- .htaccess</SAMP>&quot; can be used in the <SAMP>httpd.conf</SAMP> file
- and in <SAMP>.htaccess</SAMP> files, but not within any
- &lt;Directory&gt; or &lt;VirtualHost&gt; containers.
- </P>
-
- <HR>
- <H2><A NAME="Override">Override</A></H2>
- <P>
- This directive attribute indicates which configuration override must
- be active in order for the directive to be processed when it appears
- in a <SAMP>.htaccess</SAMP> file. If the directive's
- <A
- HREF="#Context"
- REL="Help"
- >context</A>
- doesn't permit it to appear in <SAMP>.htaccess</SAMP> files, this
- attribute should say &quot;<EM>Not applicable</EM>&quot;.
- </P>
- <P>
- Overrides are activated by the
- <A
- HREF="core.html#allowoverride"
- REL="Help"
- ><SAMP>AllowOverride</SAMP></A>
- directive, and apply to a particular scope (such as a directory) and
- all descendants, unless further modified by other
- <SAMP>AllowOverride</SAMP> directives at lower levels. The
- documentation for that directive also lists the possible override
- names available.
- </P>
-
- <HR>
- <H2><A NAME="Status">Status</A></H2>
- <P>
- This indicates how tightly bound into the Apache Web server the
- directive is; in other words, you may need to recompile the server
- with an enhanced set of modules in order to gain access to the
- directive and its functionality. Possible values for this attribute
- are:
- </P>
- <DL>
- <DT><STRONG>Core</STRONG>
- </DT>
- <DD>If a directive is listed as having &quot;Core&quot; status, that
- means it is part of the innermost portions of the Apache Web server,
- and is always available.
- <P>
- </P>
- </DD>
- <DT><STRONG>Base</STRONG>
- </DT>
- <DD>A directive labeled as having &quot;Base&quot; status is
- supported by one of the standard Apache modules which is compiled
- into the server by default, and is therefore normally available
- unless you've taken steps to remove the module from your configuration.
- <P>
- </P>
- </DD>
- <DT><STRONG>Extension</STRONG>
- </DT>
- <DD>A directive with &quot;Extension&quot; status is provided by one
- of the modules included with the Apache server kit, but the module
- isn't normally compiled into the server. To enable the directive
- and its functionality, you will need to change the server build
- configuration files and re-compile Apache.
- <P>
- </P>
- </DD>
- <DT><STRONG>Experimental</STRONG>
- </DT>
- <DD>&quot;Experimental&quot; status indicates that the directive is
- available as part of the Apache kit, but you're on your own if you
- try to use it. The directive is being documented for completeness,
- and is not necessarily supported. The module which provides the
- directive may or may not be compiled in by default; check the top of
- the page which describes the directive and its module to see if it
- remarks on the availability.
- <P>
- </P>
- </DD>
- </DL>
-
- <HR>
- <H2><A NAME="Module">Module</A></H2>
- <P>
- This quite simply lists the name of the source module which defines
- the directive.
- </P>
-
- <HR>
- <H2><A NAME="Compatibility">Compatibility</A></H2>
- <P>
- If the directive wasn't part of the original Apache version 1
- distribution, the version in which it was introduced should be listed
- here. If the directive has the same name as one from the NCSA HTTPd
- server, any inconsistencies in behaviour between the two should also
- be mentioned. Otherwise, this attribute should say &quot;<EM>No
- compatibility issues.</EM>&quot;
- </P>
-<!--#include virtual="footer.html" -->
- </BODY>
-</HTML>
diff --git a/docs/manual/mpm.html.en b/docs/manual/mpm.html.en
deleted file mode 100644
index 7521751bfe..0000000000
--- a/docs/manual/mpm.html.en
+++ /dev/null
@@ -1,96 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<HTML>
-<HEAD>
-<TITLE>Available MPM's for Apache 2.0</TITLE>
-</HEAD>
-
-<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
-<BODY
- BGCOLOR="#FFFFFF"
- TEXT="#000000"
- LINK="#0000FF"
- VLINK="#000080"
- ALINK="#FF0000"
->
-<h1 align="center">Apache 2.0 - Available MPM's</h1>
-<p align="center"><em>Dated 15<sup>th</sup> January 2000</em></p>
-<p>Apache 2.0 has a new architecture that moves the processing of requests from the code server into a MultiProcessing Module (MPM). By selecting the MPM to use you can alter the way the server behaves. Additionally the introduction of the MPM's has led to platforms developing their own optimised modules. On some platforms there is no choice, whilst on others there are different options, each with differing processing models. This list aims to help you select a suitable MPM for your system.</p>
-<hr>
-<h3>Platforms</h3>
-<ul>
-<li><A href="#unix">Unix</a></li>
-<li><a href="#windows">Windows</a></li>
-<li><a href="#os2">OS/2</a></li>
-<li><a href="#beos">BeOS</a></li>
-</ul>
-<a name="unix"><h3>Unix</h3>
-<table width="100%" border="1">
-<tr>
-<th width="20%">MPM</th>
-<th width="60%">Description</th>
-<th width="20%">Maintainer</th>
-</tr>
-<tr>
-<td>prefork</td>
-<td>The prefork MPM reproduces the behaviour of Apache 1.3.</td>
-<td>??</td>
-</tr>
-<tr>
-<td>mpmt_pthread</td>
-<td>This MPM uses a multi-process, multi-threaded model to provide good scability and stability.</td>
-<td>Manoj?</td>
-</tr>
-<tr>
-<td>dexter</td>
-<td>This is Manoj's plaything. It has a number of hybrid features that Manoj has been looking at to improve performance.</td>
-<td><a href="mailto:manojk@io.com">Manoj</a></td>
-</tr>
-</table>
-
-<a name="windows"><h3>Windows</h3>
-<table width="100%" border="1">
-<tr>
-<th width="20%">MPM</th>
-<th width="60%">Description</th>
-<th width="20%">Maintainer</th>
-</tr>
-<tr>
-<td>winnt</td>
-<td>The Windows MPM. This is mainly aimed at Windows NT.</td>
-<td><a href="mailto:stoddard@raleigh.ibm.com">Bill Stoddard</a></td>
-</tr>
-</table>
-
-<a name="os2"><h3>OS/2</h3>
-<table width="100%" border="1">
-<tr>
-<th width="20%">MPM</th>
-<th width="60%">Description</th>
-<th width="20%">Maintainer</th>
-</tr>
-<tr>
-<td>spmt_os2</td>
-<td>Single process, multiple thread MPM for OS2.</td>
-<td><a href="mailto:brianh@kheldar.apana.org.au">Brian Havard</a></td>
-</tr>
-</table>
-
-<a name="beos"><h3>BeOS</h3>
-<table width="100%" border="1">
-<tr>
-<th width="20%">MPM</th>
-<th width="60%">Description</th>
-<th width="20%">Maintainer</th>
-</tr>
-<tr>
-<td>mpmt_beos</td>
-<td>Multi-threaded MPM for BeOS. This follows the mpmt_pthread model.</td>
-<td><a href="mailto:dreid@jetnet.co.uk">David Reid</a></td>
-</tr>
-</table>
-
-<hr>
-<I>David Reid, 15<sup>th</sup> January 2000</I>
-</body>
-</html>
-
diff --git a/docs/manual/new_features_2_0.html.en b/docs/manual/new_features_2_0.html.en
deleted file mode 100644
index d0ae3450eb..0000000000
--- a/docs/manual/new_features_2_0.html.en
+++ /dev/null
@@ -1,51 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<HTML><HEAD>
-<TITLE>New features with Apache 2.0</TITLE>
-</HEAD>
-
-<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
-<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF"
- VLINK="#000080" ALINK="#FF0000">
-<!--#include virtual="header.html" -->
-<H1 ALIGN="CENTER">Overview of New Features in Apache 2.0</H1>
-
-<P>Enhancements: <A HREF="#core">Core</A> |
-
-<P><HR>
-
-<H2><A NAME="core">Core Enhancements:</A></H2>
-
-<DL>
-<DT><STRONG>Unix Threading</STRONG>
-<DD>On Unix systems with POSIX threads support, Apache can now run in a
- hybrid multiprocess, multithreaded mode. This should improve
- scalability.
-
-<DT><STRONG>New Build System</STRONG>
-<DD>The build system has been rewritten from scratch to be based on
- autoconf and libtool. This makes Apache's configuration system more
- similar to that of other packages.
-
-<DT><STRONG>Multiprotocol Support</STRONG>
-<DD>Apache now has some of the infrastructure in place to support serving
- multiple protocols. mod_echo has been written as an example.
-
-<DT><STRONG>Better support for non-Unix platforms</STRONG>
-<DD>Apache 2.0 should be faster and more stable on non-Unix platforms such
- as BeOS, OS/2, and Windows. With the introduction of platform-specific
- multiprocessing modules (MPM) and the Apache Portable Runtime, these
- platforms can now avoid using POSIX-emulation functions that are
- sometimes buggy and always hurt performance.
-<DD>A list of the MPM's currently available is <a href="mpm.html">here</a>.
-<DT><STRONG>New API</STRONG>
-<DD>The API for modules has changed significantly for 2.0. Many of the
- module-ordering problems from 1.3 should be gone. 2.0 does much of
- this automatically, and module ordering is now done per-hook to
- allow more flexibility. Also, new calls have been added that should
- allow modules to do more without requiring patching of the core
- Apache server.
-
-<!--#include virtual="footer.html" -->
-</BODY>
-</HTML>
-
diff --git a/docs/manual/platform/netware.html b/docs/manual/platform/netware.html
deleted file mode 100644
index 8add778b5f..0000000000
--- a/docs/manual/platform/netware.html
+++ /dev/null
@@ -1,278 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<HTML>
-<HEAD>
-<TITLE>Using Apache with Novell NetWare 5</TITLE>
-</HEAD>
-
-<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
-<BODY
- BGCOLOR="#FFFFFF"
- TEXT="#000000"
- LINK="#0000FF"
- VLINK="#000080"
- ALINK="#FF0000"
->
-<!--#include virtual="header.html" -->
-
-<H1 ALIGN="CENTER">Using Apache With Novell NetWare 5</H1>
-
-<P>This document explains how to install, configure and run
- Apache 1.3 under Novell NetWare 5. Please note that at
- this time, NetWare support is entirely experimental, and is
- recommended only for experienced users. The Apache Group does not
- guarantee that this software will work as documented, or even at
- all. If you find any bugs, or wish to contribute in other ways, please
- use our <A HREF="http://www.apache.org/bug_report.html">bug reporting
- page.</A></P>
-
-<P><STRONG>Warning: Apache on NetWare has not yet been optimized for performance.
-Apache still performs best, and is most reliable on Unix platforms. Over
-time we will improve NetWare performance. Folks doing comparative reviews
-of webserver performance are asked to compare against Apache
-on a Unix platform such as Solaris, FreeBSD, or Linux.</STRONG></P>
-
-<P>
-
-Most of this document assumes that you are installing Apache from a
-binary distribution. If you want to compile Apache yourself (possibly
-to help with development, or to track down bugs), see the section on
-<A HREF="#comp">Compiling Apache for NetWare</A> below.
-
-<HR>
-
-<UL>
- <LI><A HREF="#req">Requirements</A>
- <LI><A HREF="#down">Downloading Apache for NetWare</A>
- <LI><A HREF="#inst">Installing Apache for NetWare</A>
- <LI><A HREF="#run">Running Apache for NetWare</A>
- <LI><A HREF="#use">Using Apache for NetWare</A>
- <LI><A HREF="#comp">Compiling Apache for NetWare</A>
-</UL>
-
-<HR>
-
-<H2><A NAME="req">Requirements</A></H2>
-
-Apache 1.3 is designed to run on NetWare 5.0 and 5.1.
-<P>
-
-<STRONG>If running on NetWare 5.0 you must install Service Pack 4.</STRONG>
-
-<P>
-<P>
-
-Service pack 4 is available <A HREF="http://support.novell.com/misc/patlst.htm#nw">here.</A>
-
-<H2><A NAME="down">Downloading Apache for NetWare 5</A></H2>
-
-<P>Information on the latest version of Apache can be found on the
-Apache web server at <A
-HREF="http://www.apache.org/">http://www.apache.org/</A>. This will
-list the current release, any more recent alpha or beta-test releases,
-together with details of mirror web and anonymous ftp sites.</P>
-
-<P>
-<H2><A NAME="inst">Installing Apache for NetWare</A></H2>
-
-There is no Apache install program for NetWare currently. You will need
-to compile apache and copy the files over to the server manually. An
-install program will be posted at a later date.
-<P>
-Follow these steps to install Apache on NetWare (assuming you will install to sys:/apache):
-
-<UL>
- <LI>Create a directory called <CODE>Apache</CODE> on a NetWare volume
- <LI>Copy Apache.nlm, Apachec.nlm, htdigest.nlm, and htpasswd.nlm to sys:/apache
- <LI>Create a directory under <CODE>sys:/Apache</CODE> called <CODE>conf</CODE>
- <LI>Copy all the *.conf-dist-nw files to the <CODE>sys:/apache/conf</CODE> directory
- and rename them all as *.conf files
- <LI>Copy the mime.types and magic files to sys:/apache/conf directory
- <LI>Copy all files and subdirectories of \apache-1.3\htdocs to sys:/apache/htdocs and
- rename the proper index file (index.html.en) to index.html
- <LI>Copy all files and subdirectories in \apache-1.3\icons to sys:/apache/icons
- <LI>Create the directory sys:/apache/logs on the server
- <LI>Create the directory sys:/apache/cgi-bin on the server
- <LI>Create the directory sys:/apache/modules and copy all nlm modules built into the
- modules directory
- <LI>Edit the httpd.conf file setting ServerRoot and ServerName to reflect your correct
- server settings
- <LI>Add <CODE>sys:/apache</CODE> to the search path. EXAMPLE: search add sys:\apache
-</UL>
-
-<P>Apache may be installed to other volumes besides the default <CODE>sys</CODE> volume.
-
-<H2><A NAME="run">Running Apache for NetWare</A></H2>
-
-To start Apache just type <STRONG>apache</STRONG> at the console. This
-will load apache in the OS address space. If you prefer to load
-Apache in a protected address space you may specify the address space
-with the load statement as follows:
-<P>
-<PRE>
- load address space = apache apache
-</PRE>
-<P>
-This will load Apache into an address space called apache. Running multiple instances
-of Apache concurrently on NetWare is possible by loading each instance into its own
-protected address space.
-
-<P>
-After starting Apache it will be listening to port 80 (unless you
-changed the <SAMP>Port</SAMP>, <SAMP>Listen</SAMP> or
-<SAMP>BindAddress</SAMP> directives in the configuration files).
-To connect to the server and access the default page, launch a browser
-and enter the server's name or address.
-
-This should respond with a welcome page, and a link to the Apache
-manual. If nothing happens or you get an error, look in the
-<SAMP>error_log</SAMP> file in the <SAMP>logs</SAMP> directory.
-
-<P>
-
-Once your basic installation is working, you should configure it
-properly by editing the files in the <SAMP>conf</SAMP> directory.
-
-<P>
-To unload Apache running in the OS address space just type the
-following at the console:
-<PRE>
- unload apache
-</PRE>
-If apache is running in a protected address space specify the
-address space in the unload statement:
-<PRE>
- unload address space = apache apache
-</PRE>
-
-<P>
-When working with Apache it is important to know how it will find the
-configuration files. You can specify a configuration file on the command line
-in two ways:
-
-<UL>
-<LI>-f specifies a path to a particular configuration file
-</UL>
-<PRE> apache -f "vol:/my server/conf/my.conf"</PRE>
-<PRE> apache -f test/test.conf</PRE>
-
-In these cases, the proper ServerRoot should be set in the configuration file.
-
-<P>
-
-If you don't specify a configuration file name with -f, Apache will
-use the file name compiled into the server, usually "conf/httpd.conf". Invoking
-Apache with the -V switch will display this value labeled as SERVER_CONFIG_FILE.
-Apache will then determine its ServerRoot by trying the following, in this order:
-
-<UL>
-<LI>A ServerRoot directive via a -C switch.
-<LI>The -d switch on the command line.
-<LI>Current working directory
-<LI>The server root compiled into the server.
-</UL>
-
-<P>
-The server root compiled into the server is usually "sys:/apache".
-invoking apache with the -V switch will display this value
-labeled as HTTPD_ROOT.
-
-<H2><A NAME="use">Configuring Apache for NetWare</A></H2>
-
-Apache is configured by files in the <SAMP>conf</SAMP>
-directory. These are the same as files used to configure the Unix
-version, but there are a few different directives for Apache on
-NetWare. See the <A HREF="./">Apache documentation</A> for all the
-available directives.
-
-<P>
-
-The main differences in Apache for NetWare are:
-
-<UL>
- <LI><P>Because Apache for NetWare is multithreaded, it does not use a
- separate process for each request, as Apache does with
- Unix. Instead there are only threads running: a parent thread, and
- a child which handles the requests. Within the child each request is
- handled by a separate thread.
- <P>
-
- So the "process"-management directives are different:
- <P><A
- HREF="mod/core.html#maxrequestsperchild">MaxRequestsPerChild</A>
- - Like the Unix directive, this controls how many requests a
- process will serve before exiting. However, unlike Unix, a
- process serves all the requests at once, not just one, so if
- this is set, it is recommended that a very high number is
- used. The recommended default, <CODE>MaxRequestsPerChild
- 0</CODE>, does not cause the process to ever exit.
- <P><A HREF="mod/core.html#threadsperchild">ThreadsPerChild</A> -
- This directive is new, and tells the server how many threads it
- should use. This is the maximum number of connections the server
- can handle at once; be sure and set this number high enough for
- your site if you get a lot of hits. The recommended default is
- <CODE>ThreadsPerChild 50</CODE>.
- </P><A HREF="mod/core.html#threadstacksize">ThreadStackSize</A> -
- This directive tells the server what size of stack to use for
- the individual threads. The recommended default is
- <CODE>ThreadStackSize 65536</CODE>.
- <P>
- <LI><P>The directives that accept filenames as arguments now must use
- NetWare filenames instead of Unix ones. However, because Apache
- uses Unix-style names internally, you must use forward slashes, not
- backslashes. Volumes can be used; if omitted, the drive with the
- Apache executable will be assumed.</P>
- <LI><P>Apache for NetWare contains the ability to load modules at runtime,
- without recompiling the server. If Apache is compiled normally, it
- will install a number of optional modules in the
- <CODE>\Apache\modules</CODE> directory. To activate these, or other
- modules, the new <A HREF="mod/mod_so.html#loadmodule">LoadModule</A>
- directive must be used. For example, to active the status module,
- use the following (in addition to the status-activating directives
- in <CODE>access.conf</CODE>):</P>
-<PRE>
- LoadModule status_module modules/status
-</PRE>
- <P>Information on <A HREF="mod/mod_so.html#creating">creating loadable
- modules</A> is also available.</P>
-</UL>
-
-<H2><A NAME="comp">Compiling Apache for NetWare</A></H2>
-
-<P>Compiling Apache requires MetroWerks CodeWarrior 5 to be properly
- installed.
-
-<P>First, unpack the Apache distribution into an appropriate
- directory. Then go to the <CODE>src</CODE> subdirectory of the Apache
- distribution and unzip <CODE>ApacheNW.mcp.gz</CODE>. You may use a
- recent version of WinZip to accomplish this or gzip for Windows. The main
- Metrowerks project file for Apache <CODE>(ApacheNW.mcp)</CODE> is now ready
- to use. Just double click on it from within explorer and it should
- automatically launch MetroWerks CodeWarrior.
-</P>
-
-<P>All major pieces of Apache may be built using the ApacheNW.mcp project
- file. This includes modules such as status, info, and proxy. In addition,
- the following project files have been provided as well:
-<PRE>
- /apache-1.3/src/support/htpasswd.mcp.gz
- /apache-1.3/src/support/htdigest.mcp.gz
-</PRE>
-
-</P>
-<CODE>htpasswd.mcp.gz</CODE> and <CODE>htdigest.mcp.gz</CODE> will also need
-to be unzipped before they can be used with MetroWerks CodeWarrior.
-
-<P>Once Apache has been compiled, it needs to be installed in its server
- root directory. The default is the <CODE>sys:/Apache</CODE>
- directory. </P>
-<P>
-Before running the server you must fill out the conf directory.
-Copy the *.conf-dist-nw from the distribution conf directory
-and rename *.conf. Edit the ServerRoot entries to your
-actual server root (for example "sys:/apache"). Copy over
-the conf/magic and conf/mime.types files as well.
-
-<!--#include virtual="footer.html" -->
-</BODY>
-</HTML>
-
diff --git a/docs/manual/platform/perf-bsd44.html b/docs/manual/platform/perf-bsd44.html
deleted file mode 100644
index c5e978c2b9..0000000000
--- a/docs/manual/platform/perf-bsd44.html
+++ /dev/null
@@ -1,254 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<HTML>
-<HEAD>
-<TITLE>Running a High-Performance Web Server for BSD</TITLE>
-</HEAD>
-
-<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
-<BODY
- BGCOLOR="#FFFFFF"
- TEXT="#000000"
- LINK="#0000FF"
- VLINK="#000080"
- ALINK="#FF0000"
->
-<A NAME="initial">
-<!--#include virtual="header.html" -->
-</A>
-<H1 ALIGN="CENTER">Running a High-Performance Web Server for BSD</H1>
-
-Like other OS's, the listen queue is often the <STRONG>first limit
-hit</STRONG>. The
-following are comments from "Aaron Gifford &lt;agifford@InfoWest.COM&gt;"
-on how to fix this on BSDI 1.x, 2.x, and FreeBSD 2.0 (and earlier):
-
-<P>
-
-Edit the following two files:
-<BLOCKQUOTE><CODE> /usr/include/sys/socket.h <BR>
- /usr/src/sys/sys/socket.h </CODE></BLOCKQUOTE>
-In each file, look for the following:
-<PRE>
- /*
- * Maximum queue length specifiable by listen.
- */
- #define SOMAXCONN 5
-</PRE>
-
-Just change the "5" to whatever appears to work. I bumped the two
-machines I was having problems with up to 32 and haven't noticed the
-problem since.
-
-<P>
-
-After the edit, recompile the kernel and recompile the Apache server
-then reboot.
-
-<P>
-
-FreeBSD 2.1 seems to be perfectly happy, with SOMAXCONN
-set to 32 already.
-
-<P>
-
-<A NAME="detail">
-<STRONG>Addendum for <EM>very</EM> heavily loaded BSD servers</STRONG><BR>
-</A>
-from Chuck Murcko &lt;chuck@telebase.com&gt;
-
-<P>
-
-If you're running a really busy BSD Apache server, the following are useful
-things to do if the system is acting sluggish:<P>
-
-<UL>
-
-<LI> Run vmstat to check memory usage, page/swap rates, <EM>etc.</EM>
-
-<LI> Run netstat -m to check mbuf usage
-
-<LI> Run fstat to check file descriptor usage
-
-</UL>
-
-These utilities give you an idea what you'll need to tune in your kernel,
-and whether it'll help to buy more RAM.
-
-Here are some BSD kernel config parameters (actually BSDI, but pertinent to
-FreeBSD and other 4.4-lite derivatives) from a system getting heavy usage.
-The tools mentioned above were used, and the system memory was increased to
-48 MB before these tuneups. Other system parameters remained unchanged.
-
-<P>
-
-<PRE>
-maxusers 256
-</PRE>
-
-Maxusers drives a <EM>lot</EM> of other kernel parameters:
-
-<UL>
-
-<LI> Maximum # of processes
-
-<LI> Maximum # of processes per user
-
-<LI> System wide open files limit
-
-<LI> Per-process open files limit
-
-<LI> Maximum # of mbuf clusters
-
-<LI> Proc/pgrp hash table size
-
-</UL>
-
-The actual formulae for these derived parameters are in
-<EM>/usr/src/sys/conf/param.c</EM>.
-These calculated parameters can also be overridden (in part) by specifying
-your own values in the kernel configuration file:
-
-<PRE>
-# Network options. NMBCLUSTERS defines the number of mbuf clusters and
-# defaults to 256. This machine is a server that handles lots of traffic,
-# so we crank that value.
-options NMBCLUSTERS=4096 # mbuf clusters at 4096
-
-#
-# Misc. options
-#
-options CHILD_MAX=512 # maximum number of child processes
-options OPEN_MAX=512 # maximum fds (breaks RPC svcs)
-</PRE>
-
-<P>
-
-In many cases, NMBCLUSTERS must be set much larger than would appear
-necessary at first glance. The reason for this is that if the browser
-disconnects in mid-transfer, the socket fd associated with that particular
-connection ends up in the TIME_WAIT state for several minutes, during
-which time its mbufs are not yet freed. Another reason is that, on server
-timeouts, some connections end up in FIN_WAIT_2 state forever, because
-this state doesn't time out on the server, and the browser never sent
-a final FIN. For more details see the
-<A HREF="fin_wait_2.html">FIN_WAIT_2</A> page.
-
-<P>
-
-Some more info on mbuf clusters (from sys/mbuf.h):
-<PRE>
-/*
- * Mbufs are of a single size, MSIZE (machine/machparam.h), which
- * includes overhead. An mbuf may add a single "mbuf cluster" of size
- * MCLBYTES (also in machine/machparam.h), which has no additional overhead
- * and is used instead of the internal data area; this is done when
- * at least MINCLSIZE of data must be stored.
- */
-</PRE>
-
-<P>
-
-CHILD_MAX and OPEN_MAX are set to allow up to 512 child processes (different
-than the maximum value for processes per user ID) and file descriptors.
-These values may change for your particular configuration (a higher OPEN_MAX
-value if you've got modules or CGI scripts opening lots of connections or
-files). If you've got a lot of other activity besides httpd on the same
-machine, you'll have to set NPROC higher still. In this example, the NPROC
-value derived from maxusers proved sufficient for our load.
-
-<P>
-
-To increase the size of the <CODE>listen()</CODE> queue, you need to
-adjust the value of SOMAXCONN. SOMAXCONN is not derived from maxusers,
-so you'll always need to increase that yourself. We use a value guaranteed
-to be larger than Apache's default for the listen() of 128, currently.
-The actual value for SOMAXCONN is set in <CODE>sys/socket.h</CODE>.
-The best way to adjust this parameter is run-time, rather than changing
-it in this header file and thus hardcoding a value in the kernel and
-elsewhere. To do this, edit <CODE>/etc/rc.local</CODE> and add the
-following line:
-<PRE>
- /usr/sbin/sysctl -w kern.somaxconn=256
-</PRE>
-
-<P>
-
-We used <CODE>256</CODE> but you can tune it for your own setup. In
-many cases, however, even the default value of <CODE>128</CODE> (for
-later versions of FreeBSD) is OK.
-
-<P>
-
-<STRONG>Caveats</STRONG>
-
-<P>
-
-Be aware that your system may not boot with a kernel that is configured
-to use more resources than you have available system RAM.
-<STRONG>ALWAYS</STRONG>
-have a known bootable kernel available when tuning your system this way,
-and use the system tools beforehand to learn if you need to buy more
-memory before tuning.
-
-<P>
-
-RPC services will fail when the value of OPEN_MAX is larger than 256.
-This is a function of the original implementations of the RPC library,
-which used a byte value for holding file descriptors. BSDI has partially
-addressed this limit in its 2.1 release, but a real fix may well await
-the redesign of RPC itself.
-
-<P>
-
-Finally, there's the hard limit of child processes configured in Apache.
-
-<P>
-
-For versions of Apache later than 1.0.5 you'll need to change the
-definition for <STRONG>HARD_SERVER_LIMIT</STRONG> in <EM>httpd.h</EM> and
-recompile if you need to run more than the default 150 instances of httpd.
-
-<P>
-
-From conf/httpd.conf-dist:
-
-<PRE>
-# Limit on total number of servers running, <EM>i.e.</EM>, limit on the number
-# of clients who can simultaneously connect --- if this limit is ever
-# reached, clients will be LOCKED OUT, so it should NOT BE SET TOO LOW.
-# It is intended mainly as a brake to keep a runaway server from taking
-# Unix with it as it spirals down...
-
-MaxClients 150
-</PRE>
-
-Know what you're doing if you bump this value up, and make sure you've
-done your system monitoring, RAM expansion, and kernel tuning beforehand.
-Then you're ready to service some serious hits!
-
-<P>
-
-Thanks to <EM>Tony Sanders</EM> and <EM>Chris Torek</EM> at BSDI for their
-helpful suggestions and information.
-
-<P>
-
-"M. Teterin" &lt;mi@ALDAN.ziplink.net&gt; writes:<P>
-<BLOCKQUOTE>It really does help if your kernel and frequently used utilities
-are fully optimized. Rebuilding the FreeBSD kernel on an AMD-133
-(486-class CPU) web-server with<BR>
-<CODE> -m486 -fexpensive-optimizations -fomit-frame-pointer -O2</CODE><BR>
-helped reduce the number of "unable" errors, because the CPU was
-often maxed out.</BLOCKQUOTE>
-<P>
-
-<HR>
-
-<H3>More welcome!</H3>
-
-If you have tips to contribute, send mail to
-<A HREF="mailto:apache@apache.org">apache@apache.org</A>
-
-<!--#include virtual="footer.html" -->
-</BODY></HTML>
-
diff --git a/docs/manual/platform/perf-dec.html b/docs/manual/platform/perf-dec.html
deleted file mode 100644
index 2b9cc9cc5e..0000000000
--- a/docs/manual/platform/perf-dec.html
+++ /dev/null
@@ -1,285 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<HTML>
-<HEAD>
-<TITLE>Performance Tuning Tips for Digital Unix</TITLE>
-</HEAD>
-<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
-<BODY
- BGCOLOR="#FFFFFF"
- TEXT="#000000"
- LINK="#0000FF"
- VLINK="#000080"
- ALINK="#FF0000"
->
-<!--#include virtual="header.html" -->
-<H1 ALIGN="CENTER">Performance Tuning Tips for Digital Unix</H1>
-
-Below is a set of newsgroup posts made by an engineer from DEC in
-response to queries about how to modify DEC's Digital Unix OS for more
-heavily loaded web sites. Copied with permission.
-
-<HR>
-
-<H2>Update</H2>
-From: Jeffrey Mogul &lt;mogul@pa.dec.com&gt;<BR>
-Date: Fri, 28 Jun 96 16:07:56 MDT<BR>
-
-<OL>
-<LI> The advice given in the README file regarding the
- "tcbhashsize" variable is incorrect. The largest value
- this should be set to is 1024. Setting it any higher
- will have the perverse result of disabling the hashing
- mechanism.
-
-<LI>Patch ID OSF350-146 has been superseded by
-<BLOCKQUOTE>
- Patch ID OSF350-195 for V3.2C<BR>
- Patch ID OSF360-350195 for V3.2D
-</BLOCKQUOTE>
- Patch IDs for V3.2E and V3.2F should be available soon.
- There is no known reason why the Patch ID OSF360-350195
- won't work on these releases, but such use is not officially
- supported by Digital. This patch kit will not be needed for
- V3.2G when it is released.
-</OL>
-<HR>
-
-
-<PRE>
-From mogul@pa.dec.com (Jeffrey Mogul)
-Organization DEC Western Research
-Date 30 May 1996 00:50:25 GMT
-Newsgroups <A HREF="news:comp.unix.osf.osf1">comp.unix.osf.osf1</A>
-Message-ID &lt;4oirch$bc8@usenet.pa.dec.com&gt;
-Subject Re: Web Site Performance
-References 1
-
-
-
-In article &lt;skoogDs54BH.9pF@netcom.com&gt; skoog@netcom.com (Jim Skoog) writes:
-&gt;Where are the performance bottlenecks for Alpha AXP running the
-&gt;Netscape Commerce Server 1.12 with high volume internet traffic?
-&gt;We are evaluating network performance for a variety of Alpha AXP
-&gt;runing DEC UNIX 3.2C, which run DEC's seal firewall and behind
-&gt;that Alpha 1000 and 2100 webservers.
-
-Our experience (running such Web servers as <A
- HREF="http://altavista.digital.com">altavista.digital.com</A>
-and <A HREF="http://www.digital.com"
- >www.digital.com</A>) is that there is one important kernel tuning
-knob to adjust in order to get good performance on V3.2C. You
-need to patch the kernel global variable "somaxconn" (use dbx -k
-to do this) from its default value of 8 to something much larger.
-
-How much larger? Well, no larger than 32767 (decimal). And
-probably no less than about 2048, if you have a really high volume
-(millions of hits per day), like AltaVista does.
-
-This change allows the system to maintain more than 8 TCP
-connections in the SYN_RCVD state for the HTTP server. (You
-can use "netstat -An |grep SYN_RCVD" to see how many such
-connections exist at any given instant).
-
-If you don't make this change, you might find that as the load gets
-high, some connection attempts take a very long time. And if a lot
-of your clients disconnect from the Internet during the process of
-TCP connection establishment (this happens a lot with dialup
-users), these "embryonic" connections might tie up your somaxconn
-quota of SYN_RCVD-state connections. Until the kernel times out
-these embryonic connections, no other connections will be accepted,
-and it will appear as if the server has died.
-
-The default value for somaxconn in Digital UNIX V4.0 will be quite
-a bit larger than it has been in previous versions (we inherited
-this default from 4.3BSD).
-
-Digital UNIX V4.0 includes some other performance-related changes
-that significantly improve its maximum HTTP connection rate. However,
-we've been using V3.2C systems to front-end for altavista.digital.com
-with no obvious performance bottlenecks at the millions-of-hits-per-day
-level.
-
-We have some Webstone performance results available at
- http://www.digital.com/info/alphaserver/news/webff.html
-
-<EM>[The document referenced above is no longer at that URL -- Ed.]</EM>
-
-I'm not sure if these were done using V4.0 or an earlier version
-of Digital UNIX, although I suspect they were done using a test
-version of V4.0.
-
--Jeff
-
-<HR>
-
-----------------------------------------------------------------------------
-
-From mogul@pa.dec.com (Jeffrey Mogul)
-Organization DEC Western Research
-Date 31 May 1996 21:01:01 GMT
-Newsgroups <A HREF="news:comp.unix.osf.osf1">comp.unix.osf.osf1</A>
-Message-ID &lt;4onmmd$mmd@usenet.pa.dec.com&gt;
-Subject Digital UNIX V3.2C Internet tuning patch info
-
-----------------------------------------------------------------------------
-
-Something that probably few people are aware of is that Digital
-has a patch kit available for Digital UNIX V3.2C that may improve
-Internet performance, especially for busy web servers.
-
-This patch kit is one way to increase the value of somaxconn,
-which I discussed in a message here a day or two ago.
-
-I've included in this message the revised README file for this
-patch kit below. Note that the original README file in the patch
-kit itself may be an earlier version; I'm told that the version
-below is the right one.
-
-Sorry, this patch kit is NOT available for other versions of Digital
-UNIX. Most (but not quite all) of these changes also made it into V4.0,
-so the description of the various tuning parameters in this README
-file might be useful to people running V4.0 systems.
-
-This patch kit does not appear to be available (yet?) from
- <A HREF="http://www.service.digital.com/html/patch_service.html"
- >http://www.service.digital.com/html/patch_service.html</A>
-so I guess you'll have to call Digital's Customer Support to get it.
-
--Jeff
-
-DESCRIPTION: Digital UNIX Network tuning patch
-
- Patch ID: OSF350-146
-
- SUPERSEDED PATCHES: OSF350-151, OSF350-158
-
- This set of files improves the performance of the network
- subsystem on a system being used as a web server. There are
- additional tunable parameters included here, to be used
- cautiously by an informed system administrator.
-
-TUNING
-
- To tune the web server, the number of simultaneous socket
- connection requests are limited by:
-
- somaxconn Sets the maximum number of pending requests
- allowed to wait on a listening socket. The
- default value in Digital UNIX V3.2 is 8.
- This patch kit increases the default to 1024,
- which matches the value in Digital UNIX V4.0.
-
- sominconn Sets the minimum number of pending connections
- allowed on a listening socket. When a user
- process calls listen with a backlog less
- than sominconn, the backlog will be set to
- sominconn. sominconn overrides somaxconn.
- The default value is 1.
-
- The effectiveness of tuning these parameters can be monitored by
- the sobacklog variables available in the kernel:
-
- sobacklog_hiwat Tracks the maximum pending requests to any
- socket. The initial value is 0.
-
- sobacklog_drops Tracks the number of drops exceeding the
- socket set backlog limit. The initial
- value is 0.
-
- somaxconn_drops Tracks the number of drops exceeding the
- somaxconn limit. When sominconn is larger
- than somaxconn, tracks the number of drops
- exceeding sominconn. The initial value is 0.
-
- TCP timer parameters also affect performance. Tuning the following
- require some knowledge of the characteristics of the network.
-
- tcp_msl Sets the tcp maximum segment lifetime.
- This is the maximum lifetime in half
- seconds that a packet can be in transit
- on the network. This value, when doubled,
- is the length of time a connection remains
- in the TIME_WAIT state after a incoming
- close request is processed. The unit is
- specified in 1/2 seconds, the initial
- value is 60.
-
- tcp_rexmit_interval_min
- Sets the minimum TCP retransmit interval.
- For some WAN networks the default value may
- be too short, causing unnecessary duplicate
- packets to be sent. The unit is specified
- in 1/2 seconds, the initial value is 1.
-
- tcp_keepinit This is the amount of time a partially
- established connection will sit on the listen
- queue before timing out (<EM>e.g.</EM>, if a client
- sends a SYN but never answers our SYN/ACK).
- Partially established connections tie up slots
- on the listen queue. If the queue starts to
- fill with connections in SYN_RCVD state,
- tcp_keepinit can be decreased to make those
- partial connects time out sooner. This should
- be used with caution, since there might be
- legitimate clients that are taking a while
- to respond to SYN/ACK. The unit is specified
- in 1/2 seconds, the default value is 150
- (ie. 75 seconds).
-
- The hashlist size for the TCP inpcb lookup table is regulated by:
-
- tcbhashsize The number of hash buckets used for the
- TCP connection table used in the kernel.
- The initial value is 32. For best results,
- should be specified as a power of 2. For
- busy Web servers, set this to 2048 or more.
-
- The hashlist size for the interface alias table is regulated by:
-
- inifaddr_hsize The number of hash buckets used for the
- interface alias table used in the kernel.
- The initial value is 32. For best results,
- should be specified as a power of 2.
-
- ipport_userreserved The maximum number of concurrent non-reserved,
- dynamically allocated ports. Default range
- is 1025-5000. The maximum value is 65535.
- This limits the numer of times you can
- simultaneously telnet or ftp out to connect
- to other systems.
-
- tcpnodelack Don't delay acknowledging TCP data; this
- can sometimes improve performance of locally
- run CAD packages. Default is value is 0,
- the enabled value is 1.
-
- Digital UNIX version:
-
- V3.2C
-Feature V3.2C patch V4.0
-======= ===== ===== ====
-somaxconn X X X
-sominconn - X X
-sobacklog_hiwat - X -
-sobacklog_drops - X -
-somaxconn_drops - X -
-tcpnodelack X X X
-tcp_keepidle X X X
-tcp_keepintvl X X X
-tcp_keepcnt - X X
-tcp_keepinit - X X
-TCP keepalive per-socket - - X
-tcp_msl - X -
-tcp_rexmit_interval_min - X -
-TCP inpcb hashing - X X
-tcbhashsize - X X
-interface alias hashing - X X
-inifaddr_hsize - X X
-ipport_userreserved - X -
-sysconfig -q inet - - X
-sysconfig -q socket - - X
-
-</PRE>
-<!--#include virtual="footer.html" -->
-</BODY>
-</HTML>
diff --git a/docs/manual/platform/perf-hp.html b/docs/manual/platform/perf-hp.html
deleted file mode 100644
index ca902a09fe..0000000000
--- a/docs/manual/platform/perf-hp.html
+++ /dev/null
@@ -1,122 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<HTML>
-<HEAD>
-<TITLE>Running a High-Performance Web Server on HPUX</TITLE>
-</HEAD>
-
-<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
-<BODY
- BGCOLOR="#FFFFFF"
- TEXT="#000000"
- LINK="#0000FF"
- VLINK="#000080"
- ALINK="#FF0000"
->
-<A NAME="initial">&nbsp;</A>
-<!--#include virtual="header.html" -->
-
-<H1 ALIGN="CENTER">Running a High-Performance Web Server for HPUX</H1>
-
-<PRE>
-Date: Wed, 05 Nov 1997 16:59:34 -0800
-From: Rick Jones &lt;<A HREF="mailto:raj@cup.hp.com">raj@cup.hp.com</A>&gt;
-Reply-To: raj@cup.hp.com
-Organization: Network Performance
-Subject: HP-UX tuning tips
-</PRE>
-
-Here are some tuning tips for HP-UX to add to the tuning page.
-
-<P>
-
-For HP-UX 9.X: Upgrade to 10.20<BR>
-For HP-UX 10.[00|01|10]: Upgrade to 10.20
-
-<P>
-
-For HP-UX 10.20:
-
-<P>
-
-Install the latest cumulative ARPA Transport Patch. This will allow you
-to configure the size of the TCP connection lookup hash table. The
-default is 256 buckets and must be set to a power of two. This is
-accomplished with adb against the *disc* image of the kernel. The
-variable name is tcp_hash_size.
-
-Notice that it's critically important that you use "W" to write a 32 bit
-quantity, not "w" to write a 16 bit value when patching the disc image because
-the tcp_hash_size variable is a 32 bit quantity.
-
-<P>
-
-How to pick the value? Examine the output of
-<A HREF="ftp://ftp.cup.hp.com/dist/networking/tools/connhist">
-ftp://ftp.cup.hp.com/dist/networking/tools/connhist</A> and see how many
-total TCP connections exist on the system. You probably want that number
-divided by the hash table size to be reasonably small, say less than 10.
-Folks can look at HP's SPECweb96 disclosures for some common settings.
-These can be found at <A HREF="http://www.specbench.org/">
-http://www.specbench.org/</A>. If an HP-UX system was
-performing at 1000 SPECweb96 connections per second, the TIME_WAIT time
-of 60 seconds would mean 60,000 TCP "connections" being tracked.
-
-<P>
-
-Folks can check their listen queue depths with
-<A HREF="ftp://ftp.cup.hp.com/dist/networking/misc/listenq">
-ftp://ftp.cup.hp.com/dist/networking/misc/listenq</A>.
-
-<P>
-
-If folks are running Apache on a PA-8000 based system, they should
-consider "chatr'ing" the Apache executable to have a large page size.
-This would be "chatr +pi L &lt;BINARY&gt;." The GID of the running executable
-must have MLOCK privileges. Setprivgrp(1m) should be consulted for
-assigning MLOCK. The change can be validated by running Glance and
-examining the memory regions of the server(s) to make sure that they
-show a non-trivial fraction of the text segment being locked.
-
-<P>
-
-If folks are running Apache on MP systems, they might consider writing a
-small program that uses mpctl() to bind processes to processors. A
-simple pid % numcpu algorithm is probably sufficient. This might even go
-into the source code.
-
-<P>
-
-If folks are concerned about the number of FIN_WAIT_2 connections, they
-can use nettune to shrink the value of tcp_keepstart. However, they
-should be careful there - certainly do not make it less than oh two to
-four minutes. If tcp_hash_size has been set well, it is probably OK to
-let the FIN_WAIT_2's take longer to timeout (perhaps even the default
-two hours) - they will not on average have a big impact on performance.
-
-<P>
-
-There are other things that could go into the code base, but that might
-be left for another email. Feel free to drop me a message if you or
-others are interested.
-
-<P>
-
-sincerely,
-
-<P>
-
-rick jones<BR>
-<A HREF="http://www.cup.hp.com/netperf/NetperfPage.html">
-http://www.cup.hp.com/netperf/NetperfPage.html</A>
-
-<HR>
-
-<H3 ALIGN="CENTER">
- Apache HTTP Server Version 1.3
-</H3>
-
-<A HREF="./"><IMG SRC="../images/index.gif" ALT="Index"></A>
-<A HREF="../"><IMG SRC="../images/home.gif" ALT="Home"></A>
-
-</BODY></HTML>
-
diff --git a/docs/manual/platform/perf.html b/docs/manual/platform/perf.html
deleted file mode 100644
index 73bd5b5b20..0000000000
--- a/docs/manual/platform/perf.html
+++ /dev/null
@@ -1,175 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<HTML>
-<HEAD>
-<TITLE>Hints on Running a High-Performance Web Server</TITLE>
-</HEAD>
-
-<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
-<BODY
- BGCOLOR="#FFFFFF"
- TEXT="#000000"
- LINK="#0000FF"
- VLINK="#000080"
- ALINK="#FF0000"
->
-<!--#include virtual="header.html" -->
-<H1 ALIGN="CENTER">Hints on Running a High-Performance Web Server</H1>
-
-Running Apache on a heavily loaded web server, one often encounters
-problems related to the machine and OS configuration. "Heavy" is
-relative, of course - but if you are seeing more than a couple hits
-per second on a sustained basis you should consult the pointers on
-this page. In general the suggestions involve how to tune your kernel
-for the heavier TCP load, hardware/software conflicts that arise, <EM>etc.</EM>
-
-<UL>
-<LI><A HREF="#AUX">A/UX (Apple's UNIX)</A>
-<LI><A HREF="#BSD">BSD-based (BSDI, FreeBSD, etc)</A>
-<LI><A HREF="#DEC">Digital UNIX</A>
-<LI><A HREF="perf-hp.html">HPUX</A>
-<LI><A HREF="#Linux">Linux</A>
-<LI><A HREF="#Solaris">Solaris</A>
-<LI><A HREF="#SunOS">SunOS 4.x</A>
-<LI><A HREF="#SVR4">SVR4</A>
-</UL>
-
-<HR>
-
-<H3><A NAME="AUX">
-A/UX (Apple's UNIX)
-</A></H3>
-
-If you are running Apache on A/UX, a page that gives some helpful
-performance hints (concerning the <EM>listen()</EM> queue and using
-virtual hosts)
-<A HREF="http://www.jaguNET.com/apache.html">can be found here</A>
-
-<P><HR>
-
-<H3><A NAME="BSD">
-BSD-based (BSDI, FreeBSD, etc)
-</A></H3>
-
-<A HREF="perf-bsd44.html#initial">Quick</A> and
-<A HREF="perf-bsd44.html#detail">detailed</A>
-performance tuning hints for BSD-derived systems.
-
-<P><HR>
-
-<H3><A NAME="DEC">
-Digital UNIX
-</A></H3>
-
-<UL>
- <LI><A
- HREF="http://www.digital.com/info/internet/document/ias/tuning.html"
- >DIGITAL UNIX Tuning Parameters for Web Servers</A>
- <LI>We have some <A HREF="perf-dec.html">newsgroup postings</A> on how
- to tune Digital UNIX 3.2 and 4.0.
-</UL>
-
-<P><HR>
-
-<H3><A NAME="Linux">
-Linux
-</A></H3>
-
-There are no known problems with heavily loaded systems running Linux
-kernels 2.0.32 or later. Earlier kernels have some problems, and an
-upgrade to the latest 2.0.x is a good idea to eliminate various security
-and denial of service attacks.
-
-<P><HR>
-
-<H3><A NAME="Solaris">
-Solaris 2.4
-</A></H3>
-
-The Solaris 2.4 TCP implementation has a few inherent limitations that
-only became apparent under heavy loads. This has been fixed to some
-extent in 2.5 (and completely revamped in 2.6), but for now consult
-the following URL for tips on how to expand the capabilities if you
-are finding slowdowns and lags are hurting performance.
-
-<P>
-
-Other links:
-
-<UL>
-
-<LI><A HREF="http://www.sun.com/sun-on-net/performance.html">
-World Wide Web Server Performance,
-&lt;http://www.sun.com/sun-on-net/performance.html&gt;</A>
-<LI><A HREF="http://www.rvs.uni-hannover.de/people/voeckler/tune/EN/tune.html">
-Solaris 2.x - tuning your TCP/IP stack</A> contains some good technical
-information about tuning various Solaris TCP/IP parameters.
-</UL>
-
-<P><HR>
-
-<H3><A NAME="SunOS">
-SunOS 4.x
-</A></H3>
-
-More information on tuning SOMAXCONN on SunOS can be found at
-<A HREF="http://www.islandnet.com/~mark/somaxconn.html">
-http://www.islandnet.com/~mark/somaxconn.html</A>.
-
-<P><HR>
-
-<H3><A NAME="SVR4">
-SVR4
-</A></H3>
-
-Some SVR4 versions waste three system calls on every
-<SAMP>gettimeofday()</SAMP> call. Depending on the syntactic
-form of the <SAMP>TZ</SAMP> environment variable, these
-systems have several different algorithms to determine the
-local time zone (presumably <EM>compatible</EM> with
-something). The following example uses the central european
-time zone to demonstrate this:
-<DL>
- <DT><STRONG>TZ=:MET</STRONG>
- <DD>This form delegates the knowledge of the time zone
- information to an external compiled zoneinfo file
- (&agrave; la BSD).<BR>
- <STRONG>Caveat:</STRONG> Each time the gettimeofday()
- function is called, the external zone info is read in
- again (at least on some SVR4 systems). That results in
- three wasted system calls with every apache request
- served.<PRE>
- open("/usr/lib/locale/TZ/MET", O_RDONLY) = 3
- read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 7944) = 778
- close(3) = 0</PRE>
-
- <DT><STRONG>TZ=MET-1MDT,M3.5.0/02:00:00,M10.5.0/03:00:00</STRONG>
- <DD>This syntax form (&agrave; la SYSV) contains all the
- knowledge about time zone beginning and ending times in
- its external representation. It has to be parsed each
- time it is evaluated, resulting in a slight computing
- overhead, but it requires no system call. Though the
- table lookup &agrave; la BSD is the more sophisticated
- technical solution, the bad SVR4 implementation makes
- this the preferred syntax on systems which otherwise
- access the external zone info file repeatedly.
-</DL>
-You should use the <SAMP>truss</SAMP> utility on a
-single-process apache server (started with the <SAMP>-X</SAMP>
-debugging switch) to determine whether your system can profit
-from the second form of the <SAMP>TZ</SAMP> environment
-variable. If it does, you could integrate the setting of the
-preferred <SAMP>TZ</SAMP> syntax into the httpd startup
-script, which is usually simply a copy of (or symbolic link
-to) the <SAMP>apachectl</SAMP> utility script, or into the
-system's <SAMP>/etc/TIMEZONE</SAMP> script.
-
-<P><HR>
-
-<H3>More welcome!</H3>
-
-If you have tips to contribute, send mail to <A
-HREF="mailto:apache@apache.org">apache@apache.org</A>
-
-<!--#include virtual="footer.html" -->
-</BODY></HTML>
-
diff --git a/docs/manual/platform/readme-tpf.html b/docs/manual/platform/readme-tpf.html
deleted file mode 100644
index 9d1a82a279..0000000000
--- a/docs/manual/platform/readme-tpf.html
+++ /dev/null
@@ -1,208 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<HTML>
-<HEAD>
-<TITLE>The Apache TPF Port</TITLE>
-</HEAD>
-<BODY>
-<A NAME="top"></A>
-<H1 align="center">Overview of the Apache TPF Port</H1>
-<HR>
-<CENTER>[&nbsp;<A HREF="#configuration_files">Configuration Files</A>
- &nbsp;|&nbsp;<A HREF="#whats_available">What's Available</A>
- &nbsp;|&nbsp;<A HREF="#porting_notes">Porting Notes</A>&nbsp;]
-</CENTER>
-<HR>
-<BR>
-
-<P>
- This version of Apache includes changes allowing it to run on
- IBM's EBCDIC-based
- <A HREF="http://www.s390.ibm.com/products/tpf/tpfhp.html">TPF</A>
- (Transaction Processing Facility) operating system.
- Unless otherwise noted TPF version 4.1 PUT09 is required.
- <BR><BR>
- Refer to htdocs/manual/<A HREF="install-tpf.html">install-tpf.html</A>
- for step-by-step installation instructions.
- <BR><BR>
- As this is the first cut at making Apache run on TPF,
- performance tuning has not been done.
- <BR><BR>
- This port builds upon the <A HREF="ebcdic.html">EBCDIC changes</A>
- previously made to Apache.
- <BR>
-</P>
-
-<A NAME="configuration_files">&nbsp;</A>
-<H2 align=center>Apache Configuration Files</H2>
-<P>
- The distributed configuration files (httpd.conf-dist and
- mime.types, both located in the conf subdirectory)
- work on TPF. Performance considerations may dictate setting KeepAlive to "Off"
- (the default is "On") or lowering the Timeout value from the default
- 300 seconds (5 minutes) in order to reduce the number of active ECBs on your system.
-</P>
-
-<A NAME="whats_available">&nbsp;</A>
-<H2 align=center>What's Available in this Version</H2>
-
- (The Apache organization provides
- <A HREF="http://www.apache.org/docs/">online documentation</A>
- describing the various modules and components of the server.)
-
-<H3>Components/modules tested on TPF:</H3>
-
- <multicol COLS=3><UL>
- <LI>alloc.c
- <LI>ap_base64.c
- <LI>ap_checkpass.c
- <LI>ap_cpystrn.c
- <LI>ap_fnmatch.c
- <LI>ap_md5c.c
- <LI>ap_sha1.c
- <LI>ap_signal.c
- <LI>ap_slack.c
- <LI>ap_snprintf.c
- <LI>buff.c
- <LI>buildmark.c
- <LI>ebcdic.c
- <LI>gen_test.char.c
- <LI>gen_uri_delims.c
- <LI>htpasswd.c <i><small>(requires PUT10)</small></i>
- <LI>http_config.c
- <LI>http_core.c
- <LI>http_log.c
- <LI>http_main.c
- <LI>http_protocol.c
- <LI>http_request.c
- <LI>http_vhost.c
- <LI>logresolve.c <i><small>(requires PUT10)</small></i>
- <LI>mod_access.c <A HREF="#notes"> <i><small>(see note 1)</small></i></A>
- <LI>mod_actions.c
- <LI>mod_alias.c
- <LI>mod_asis.c
- <LI>mod_auth.c
- <LI>mod_auth_anon.c
- <LI>mod_autoindex.c
- <LI>mod_cern_meta.c
- <LI>mod_cgi.c <i><small>(requires PUT10)</small></i>
- <LI>mod_digest.c
- <LI>mod_dir.c
- <LI>mod_env.c
- <LI>mod_example.c
- <LI>mod_expires.c
- <LI>mod_headers.c
- <LI>mod_imap.c
- <LI>mod_include.c <A HREF="#notes"> <i><small>(see note 2)</small></i></A>
- <LI>mod_info.c
- <LI>mod_log_agent.c
- <LI>mod_log_config.c
- <LI>mod_log_referer.c
- <LI>mod_mime.c
- <LI>mod_mime_magic.c
- <LI>mod_negotiation.c
- <LI><A HREF="http://hpwww.ec-lyon.fr/~vincent/apache/mod_put.html">mod_put.c</A>
- <i> <small>(third party module)</small></i>
- <LI>mod_proxy.c
- <LI>mod_setenvif.c
- <LI>mod_speling.c
- <LI>mod_status.c
- <LI>mod_tpf_shm_static.c <i><small>(third party module, requires PUT10)</small></i>
- <LI>mod_unique_id.c <i><small>(requires PUT10)</small></i>
- <LI>mod_userdir.c
- <LI>mod_usertrack.c
- <LI>os.c
- <LI>os-inline.c
- <LI>proxy_cache.c
- <LI>proxy_connect.c
- <LI>proxy_ftp.c
- <LI>proxy_http.c
- <LI>proxy_util.c
- <LI>regular expression parser
- <LI>regular expression test tool <i><small>(requires PUT10)</small></i>
- <LI>rfc1413.c
- <LI>rotatelogs.c <i><small>(requires PUT10)</small></i>
- <LI>util.c
- <LI>util_date.c
- <LI>util_md5.c
- <LI>util_script.c
- <LI>util_uri.c
- </UL></MULTICOL>
- <A NAME="notes"></A><b>Notes:</b>
- <ol>
- <li>Use of mod_access directives &quot;<tt>allow from</tt>&quot; &amp; &quot;<tt>deny from</tt>&quot;
- with host <i>names</i> (verses ip addresses) requires TPF version 4.1 PUT10
- <li>CGI execution requires TPF version 4.1 PUT10
- </ol>
-
-<H3>Components/modules not yet supported on TPF:</H3>
-
- <multicol COLS=3><UL>
- <LI>htdigest.c
- <LI>lib/expat-lite
- <LI>mod_auth_digest.c
- <LI>mod_rewrite.c
- <LI>mod_vhost_alias.c
- </UL></MULTICOL>
-
-<H3>Components/modules that don't apply or that probably won't ever be available on TPF:</H3>
-
- <multicol COLS=3><UL>
- <LI>ab.c
- <LI>ap_getpass.c
- <LI>mod_auth_db.c
- <LI>mod_auth_dbm.c
- <LI>mod_auth_db.module
- <LI>mod_mmap_static.c
- <LI>mod_so.c
- <LI>suexec.c
- </UL></MULTICOL>
-
-<A NAME="porting_notes">&nbsp;</A>
-<H2 align=center>Porting Notes</H2>
-<P>
- <H3>Changes made due to differences between UNIX and
- TPF's process models:</H3>
- <UL>
- <LI><STRONG>Signals</STRONG>: On TPF a signal that is sent to a process
- remains unhandled until the process explicitly requests that signals
- be handled using the <CODE>tpf_process_signals()</CODE> function.
- Additionally, the default action for an alarm on TPF is to take
- an OPR-7777 dump and exit. (On UNIX the default is the equivalent
- of <CODE>exit()</CODE> with no dump taken.)
- These differences necessitated a few modifications:
- <BR><BR>
- <UL>
- <LI>bypass the use of <CODE>ap_block_alarms()</CODE> &amp;
- <CODE>ap_unblock_alarms()</CODE>
- <LI>add <CODE>tpf_process_signals()</CODE> calls
- <LI>add <CODE>select()</CODE> calls to prevent blocking.
- </UL>
- <BR>
- </UL>
-
- <H3>Find that function...</H3>
- <P>Some simple functions &amp; definitions initially needed to be added
- on TPF, such as <CODE>FD_SET()</CODE>.
- We've put these in src/os/tpf/os.h for now.
- </P>
-
- <H3>EBCDIC changes:</H3>
- <P>TPF-specific conversion tables between US-ASCII and
- EBCDIC (character set IBM-1047 to be exact) were created
- and put into ebcdic.c in the src/os/tpf directory.
- </P>
-
- <H3>Miscellaneous, minor changes:</H3>
- <P>Various minor changes (such as casting) were made due to
- differences in how some functions are implemented on TPF.
- </P>
-
-<HR>
-<CENTER>[&nbsp;<A HREF="#top">top</A>
- &nbsp;|&nbsp;<A HREF="#configuration_files">Configuration Files</A>
- &nbsp;|&nbsp;<A HREF="#whats_available">What's Available</A>
- &nbsp;|&nbsp;<A HREF="#porting_notes">Porting Notes</A>&nbsp;]
-</CENTER>
-
-</BODY>
-</HTML>
diff --git a/docs/manual/platform/unixware.html b/docs/manual/platform/unixware.html
deleted file mode 100644
index a77a3b5cd4..0000000000
--- a/docs/manual/platform/unixware.html
+++ /dev/null
@@ -1,62 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<HTML>
-<HEAD>
-<TITLE>Compiling Apache under UnixWare</TITLE>
-</HEAD>
-
-<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
-<BODY
- BGCOLOR="#FFFFFF"
- TEXT="#000000"
- LINK="#0000FF"
- VLINK="#000080"
- ALINK="#FF0000"
->
-<!--#include virtual="header.html" -->
-
-<H1 ALIGN="CENTER">Compiling Apache under UnixWare</H1>
-
-To compile a working copy of Apache under UnixWare, there are several other
-steps you may need to take. These prevent such problems as zombie processes,
-bind errors, and accept errors, to name a few.
-
-<H2>UnixWare 1.x</H2>
-
-Make sure that USE_FCNTL_SERIALIZE_ACCEPT is defined (if not
-defined by Apache autoconfiguration). If using the UnixWare <EM>cc</EM>
-compiler, and you still see accept() errors, don't use compiler optimization,
-or get <EM>gcc</EM>.
-
-<H2>UnixWare 2.0.x</H2>
-
-SCO patch <A HREF="ftp://ftp.sco.com/UW20/tf2163.txt">tf2163</A> is required
-in order for Apache to work correctly on UnixWare 2.0.x. See
-<A HREF="http://www.sco.com">http://www.sco.com</A>
-for UnixWare patch information.<P>
-
-In addition, make sure that USE_FCNTL_SERIALIZE_ACCEPT is defined (if not
-defined by Apache autoconfiguration). To reduce instances of connections
-in FIN_WAIT_2 state, you may also want to define NO_LINGCLOSE (Apache 1.2
-only).
-
-<H2>UnixWare 2.1.x</H2>
-
-SCO patch <A HREF="ftp://ftp.sco.com/UW21/ptf3123b.txt">ptf3123</A> is required
-in order for Apache to work correctly on UnixWare 2.1.x. See
-<A HREF="http://www.sco.com">http://www.sco.com</A>
-for UnixWare patch information.<P>
-
-<STRONG>NOTE:</STRONG> Unixware 2.1.2 and later already have patch ptf3123
-included<P>
-
-In addition, make sure that USE_FCNTL_SERIALIZE_ACCEPT is defined (if not
-defined by Apache autoconfiguration). To reduce instances of connections
-in FIN_WAIT_2 state, you may also want to define NO_LINGCLOSE (Apache 1.2
-only).<P>
-
-Thanks to Joe Doupnik &lt;JRD@cc.usu.edu&gt; and Rich Vaughn
-&lt;rvaughn@aad.com&gt; for additional info for UnixWare builds.<P>
-
-<!--#include virtual="footer.html" -->
-</BODY>
-</HTML>
diff --git a/docs/manual/platform/windows.html b/docs/manual/platform/windows.html
deleted file mode 100644
index 95bcef390a..0000000000
--- a/docs/manual/platform/windows.html
+++ /dev/null
@@ -1,547 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<HTML>
-<HEAD>
-<TITLE>Using Apache with Microsoft Windows</TITLE>
-</HEAD>
-
-<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
-<BODY
- BGCOLOR="#FFFFFF"
- TEXT="#000000"
- LINK="#0000FF"
- VLINK="#000080"
- ALINK="#FF0000"
->
-<!--#include virtual="header.html" -->
-
-<H1 ALIGN="CENTER">Using Apache With Microsoft Windows</H1>
-
-<P>This document explains how to install, configure and run
- Apache 2.0 under Microsoft Windows. If you find any bugs, or wish
- to contribute in other ways, please use our
- <A HREF="http://www.apache.org/bugs/">bug reporting page.</A></P>
-
-<P>
-
-Most of this document assumes that you are installing Windows from a
-binary distribution. If you want to compile Apache yourself (possibly
-to help with development, or to track down bugs), see the section on
-<A HREF="#comp">Compiling Apache for Windows</A> below.
-
-<HR>
-
-<UL>
- <LI><A HREF="#req">Requirements</A>
- <LI><A HREF="#down">Downloading Apache for Windows</A>
- <LI><A HREF="#inst">Installing Apache for Windows (binary install)</A>
- <LI><A HREF="#run">Running Apache for Windows</A>
- <LI><A HREF="#use">Using Apache for Windows</A>
- <LI><A HREF="#cmdline">Running Apache for Windows from the Command Line</A>
- <LI><A HREF="#service">Running Apache for Windows as a Service</A>
- <LI><A HREF="#signal">Signalling Console Apache when running</A>
- <LI><A HREF="#signalsrv">Signalling Service Apache when running</A>
- <LI><A HREF="#comp">Compiling Apache for Windows</A>
-</UL>
-
-<HR>
-
-<H2><A NAME="req">Requirements</A></H2>
-
-Apache 2.0 is designed to run on Windows NT 4.0 and Windows 2000. The binary
-installer will only work in Intel processors. Apache may also run on Windows 95,
-Windows 98 and Windows NT 3.5.1, but these have not been tested. In
-all cases TCP/IP networking must be installed.
-
-<P>
-
-If running on Windows 95, using the "Winsock2" upgrade is REQUIRED. "Winsock 2"
-for Windows 95 is available <A HREF="http://www.microsoft.com/windows95/downloads/">here.</A>
-
-If running on NT 4.0, installing Service Pack 2 is recommended.
-<P>
-<H2><A NAME="down">Downloading Apache for Windows</A></H2>
-
-<P>Information on the latest version of Apache can be found on the
-Apache web server at <A
-HREF="http://www.apache.org/httpd">http://www.apache.org/httpd</A>. This will
-list the current release, any more recent alpha or beta-test releases,
-together with details of mirror web and anonymous ftp sites.</P>
-
-<P>
-
-You should download the version of Apache for Windows with the
-<CODE>.exe</CODE> extension. This is a single file containing Apache,
-ready to install and run. There may also be a <CODE>.zip</CODE> file
-containing the source code, to compile Apache yourself. (If there is
-no <SAMP>.zip</SAMP> file, the source will be available in a
-<SAMP>.tar.gz</SAMP> file but this will contain Unix line endings. You
-will have to convert at least the <SAMP>.mak</SAMP> and
-<SAMP>.dsp</SAMP> files to have DOS line endings before MSVC will
-understand them).
-
-<H2><A NAME="inst">Installing Apache for Windows</A></H2>
-
-Run the Apache <SAMP>.exe</SAMP> file you downloaded above. This will
-ask for:
-
-<UL>
-
- <LI>the directory to install Apache into (the default is
- <CODE>\Program Files\Apache Group\Apache</CODE> although you can
- change this to any other directory)
-
- <LI>the start menu name (default is "Apache Web Server")
-
- <LI>the installation type. The "Typical" option installs
- everything except the source code. The "Minimum" option does not
- install the manuals or source code. Choose the "Custom" install if
- you want to install the source code.
-
-</UL>
-
-<P>
-
-During the installation, Apache will configure the files in the
-<SAMP>conf</SAMP> directory for your chosen installation
-directory. However if any of the files in this directory already exist
-they will <STRONG>not</STRONG> be overwritten. Instead the new copy of
-the corresponding file will be left with the extension
-<SAMP>.default</SAMP>. So, for example, if
-<SAMP>conf\httpd.conf</SAMP> already exists it will not be altered,
-but the version which would have been installed will be left in
-<SAMP>conf\httpd.conf.default</SAMP>. After the installation has
-finished you should manually check to see what in new in the
-<SAMP>.default</SAMP> file, and if necessary update your existing
-configuration files.
-
-<P>
-
-Also, if you already have a file called <SAMP>htdocs\index.html</SAMP>
-then it will not be overwritten (no <SAMP>index.html.default</SAMP>
-file will be installed either). This should mean it a safe to install
-Apache over an existing installation (but you will have to stop the
-existing server running before doing the installation, then start the
-new one after the installation is finished).
-
-<P>
-
-After installing Apache, you should edit the configuration files in
-the <SAMP>conf</SAMP> directory as required. These files will be
-configured during the install ready for Apache to be run from the
-directory where it was installed, with the documents served from the
-subdirectory <SAMP>htdocs</SAMP>. There are lots of other options
-which should be set before you start really using Apache. However to
-get started quickly the files should work as installed.
-
-<H2><A NAME="run">Running Apache for Windows</A></H2>
-
-There are two ways you can run Apache:
-
-<UL>
- <LI>As a <A HREF="#service">"service"</A> (available on NT only). This is the best option if
- you want Apache to automatically start when you machine boots, and to
- keep Apache running when you log-off.
-
- <LI>From a <A HREF="#cmdline">console window</A>. This is the only option
- available for
- Windows 95 users.
-</UL>
-
-To start Apache as a service, you first need to install it as a
-service. Multiple Apache services can be installed, each with a
-different name and configuration. To install the default Apache
-service named "Apache", run the "Install Apache as Service (NT only)"
-option from the Start menu. Once this is done you can start the "Apache"
-service by opening the Services window (in the Control Panel), selecting Apache,
-then clicking on Start. Apache will now be running in the background. You
-can later stop Apache by clicking on Stop. As an alternative to using
-the Services window, you can start and stop the "Apache" service from the control
-line with
-
-<PRE>
- NET START APACHE
- NET STOP APACHE
-</PRE>
-
-See <A HREF="#signalsrv">Signalling Service Apache when Running</A>
-for more information on installing and controlling Apache services.
-
-<P>
-
-To run Apache from a console window, select the "Start Apache as
-console app" option from the Start menu (in Apache 1.3.4 and earlier,
-this option was called "Apache Server"). This will open a console
-window and start Apache running inside it. The window will remain
-active until you stop Apache. To stop Apache running, either select
-the "Shutdown Apache console app" icon option from the Start menu
-(this is not available in Apache 1.3.4 or earlier), or see <A
-HREF="#signal">Signalling Console Apache when Running</A> for how
-to control Apache from the command line.
-
-<P>
-
-After starting Apache running (either in a console window or as a
-service) if will be listening to port 80 (unless you changed the
-<SAMP>Port</SAMP>, <SAMP>Listen</SAMP> or <SAMP>BindAddress</SAMP>
-directives in the configuration files). To connect to the server and
-access the default page, launch a browser and enter this URL:
-
-<PRE>
- http://localhost/
-</PRE>
-
-This should respond with a welcome page, and a link to the Apache
-manual. If nothing happens or you get an error, look in the
-<SAMP>error_log</SAMP> file in the <SAMP>logs</SAMP> directory.
-If your host isn't connected to the net, you may have to use
-this URL:
-
-<PRE>
- http://127.0.0.1/
-</PRE>
-
-<P>
-
-Once your basic installation is working, you should configure it
-properly by editing the files in the <SAMP>conf</SAMP> directory.
-
-<H2><A NAME="use">Configuring Apache for Windows</A></H2>
-
-Apache is configured by files in the <SAMP>conf</SAMP>
-directory. These are the same as files used to configure the Unix
-version, but there are a few different directives for Apache on
-Windows. See the <A HREF="./">Apache documentation</A> for all the
-available directives.
-
-<P>
-
-The main differences in Apache for Windows are:
-
-<UL>
- <LI><P>Because Apache for Windows is multithreaded, it does not use a
- separate process for each request, as Apache does with
- Unix. Instead there are usually only two Apache processes running:
- a parent process, and a child which handles the requests. Within
- the child each request is handled by a separate thread.
- <P>
-
- So the "process"-management directives are different:
- <P><A
- HREF="mod/core.html#maxrequestsperchild">MaxRequestsPerChild</A>
- - Like the Unix directive, this controls how many requests a
- process will serve before exiting. However, unlike Unix, a
- process serves all the requests at once, not just one, so if
- this is set, it is recommended that a very high number is
- used. The recommended default, <CODE>MaxRequestsPerChild
- 0</CODE>, does not cause the process to ever exit.
- <STRONG>
- Warning: The server configuration file is reread when the
- new child process is started. If you have modified httpd.conf,
- the new child may not start or you may receive unexpected results.
- </STRONG>
- <P><A HREF="mod/core.html#threadsperchild">ThreadsPerChild</A> -
- This directive is new, and tells the server how many threads it
- should use. This is the maximum number of connections the server
- can handle at once; be sure and set this number high enough for
- your site if you get a lot of hits. The recommended default is
- <CODE>ThreadsPerChild 50</CODE>.</P>
- <LI><P>The directives that accept filenames as arguments now must use
- Windows filenames instead of Unix ones. However, because Apache
- uses Unix-style names internally, you must use forward slashes, not
- backslashes. Drive letters can be used; if omitted, the drive with
- the Apache executable will be assumed.</P>
- <LI><P>Apache for Windows contains the ability to load modules at runtime,
- without recompiling the server. If Apache is compiled normally, it
- will install a number of optional modules in the
- <CODE>\Apache\modules</CODE> directory. To activate these, or other
- modules, the new <A HREF="mod/mod_so.html#loadmodule">LoadModule</A>
- directive must be used. For example, to active the status module,
- use the following (in addition to the status-activating directives
- in <CODE>access.conf</CODE>):</P>
-<PRE>
- LoadModule status_module modules/ApacheModuleStatus.dll
-</PRE>
- <P>Information on <A HREF="mod/mod_so.html#creating">creating loadable
- modules</A> is also available.</P>
- <LI><P>Apache can also load ISAPI Extensions (<EM>i.e.</EM>, Internet Server
- Applications), such as those used by Microsoft's IIS, and other
- Windows servers. <A HREF="mod/mod_isapi.html">More information
- is available.</A>
-</UL>
-
-<H2><A NAME="service">Running Apache for Windows as a Service</A></H2>
- <STRONG>Note: The -n option to specify a service name is only available
- with Apache 1.3.7 and later. Earlier versions of Apache only support
- the default service name 'Apache'.</STRONG>
-
-<P>
-
-You can install Apache as a Windows NT service as follows:
-
-<PRE>
- apache -i -n "service name"
-</PRE>
-
-To install a service to use a particular configuration, specify the
-configuration file when the service is installed:
-
-<PRE>
- apache -i -n "service name" -f "\my server\conf\my.conf"
-</PRE>
-
-To remove an Apache service, use
-
-<PRE>
- apache -u -n "service name"
-</PRE>
-
-The default "service name", if one is not specified, is "Apache".
-
-<P>
-
-Once a service is installed, you can use the <SAMP>-n</SAMP> option, in conjunction
-with other options, to refer to a service's configuration file. For example:<br>
-
-To test a service's configuration file:
-<PRE>
- apache -n "service name" -t
-</PRE>
-
-To start a console Apache using a service's configuration file:
-<PRE>
- apache -n "service name"
-</PRE>
-
-<H2><A NAME="cmdline">Running Apache for Windows from the Command Line</A></H2>
-
-The Start menu icons and the NT Service manager can provide a simple
-interface for administering Apache. But in some cases it is easier to
-work from the command line.
-
-<P>
-When working with Apache it is important to know how it will find the
-configuration files. You can specify a configuration file on the command line
-in two ways:
-
-<UL>
-<LI>-f specifies a path to a particular configuration file
-</UL>
-<PRE> apache -f "c:\my server\conf\my.conf"</PRE>
-<PRE> apache -f test\test.conf</PRE>
-<UL>
-<LI>-n specifies the configuration file of an installed Apache service (Apache 1.3.7 and later)
-</UL>
-<PRE> apache -n "service name"</PRE>
-
-In these cases, the proper ServerRoot should be set in the configuration file.
-
-<P>
-
-If you don't specify a configuration file name with -f or -n, Apache will
-use the file name compiled into the server, usually "conf/httpd.conf". Invoking
-Apache with the -V switch will display this value labeled as SERVER_CONFIG_FILE.
-Apache will then determine its ServerRoot by trying the following, in this order:
-
-<UL>
-<LI>A ServerRoot directive via a -C switch.
-<LI>The -d switch on the command line.
-<LI>Current working directory
-<LI>A registry entry, created if you did a binary install.
-<LI>The server root compiled into the server.
-</UL>
-
-<P>
-The server root compiled into the server is usually "/apache".
-invoking apache with the -V switch will display this value
-labeled as HTTPD_ROOT.
-
-<P>
-When invoked from the start menu, Apache is usually passed no arguments,
-so using the registry entry is the preferred technique for console Apache.
-
-<P>
-During a binary installation, a registry key will have
-been installed, for example:
-<PRE>
- HKEY_LOCAL_MACHINE\Software\Apache Group\Apache\1.3.4\ServerRoot
-</PRE>
-
-<P>
-This key is compiled into the server and can enable you to test
-new versions without affecting the current version. Of course
-you must take care not to install the new version on top of the
-old version in the file system.
-
-<P>
-If you did not do a binary install then Apache will in some
-scenarios complain that about the missing registry key. This
-warning can be ignored if it otherwise was able to find its
-configuration files.
-
-<P>
-The value of this key is the "ServerRoot" directory, containing the
-<SAMP>conf</SAMP> directory. When Apache starts it will read the
-<SAMP>httpd.conf</SAMP> file from this directory. If this file
-contains a <SAMP>ServerRoot</SAMP> directive which is different from
-the directory obtained from the registry key above, Apache will forget
-the registry key and use the directory from the configuration file.
-If you copy the Apache directory or configuration files to a new
-location it is vital that you update the <SAMP>ServerRoot</SAMP>
-directory in the <SAMP>httpd.conf</SAMP> file to the new location.
-
-<P>
-To run Apache from the command line as a console application, use the
-following command:
-
-<PRE>
- apache
-</PRE>
-
-Apache will execute, and will remain running until it is stopped by pressing
-control-C.
-
-<H2><A NAME="signalsrv">Signalling Service Apache when running</A></H2>
-
-On Windows NT, multiple instances of Apache can be run as services.
-Signal an Apache service to start, restart, or shutdown as follows:
-
-<PRE>
- apache -n "service name" -k start
- apache -n "service name" -k restart
- apache -n "service name" -k shutdown
-</PRE>
-
-In addition, you can use the native NT NET command to
-start and stop Apache services as follows:
-
-<PRE>
- NET START "service name"
- NET STOP "service name"
-</PRE>
-
-<H2><A NAME="signal">Signalling Console Apache when running</A></H2>
-
-On Windows 95, Apache runs as a console application. You can tell a
-running Apache to stop by opening another console window and running
-
-<PRE>
- apache -k shutdown
-</PRE>
-<BLOCKQUOTE>
- <STRONG>Note: This option is only available with Apache 1.3.3 and
- later. For earlier versions, you need to use Control-C in the
- Apache console window to shut down the server.</STRONG>
-</BLOCKQUOTE>
-
-<P>
-This should be used instead of pressing Control-C in the running
-Apache console window, because it lets Apache end any current
-transactions and cleanup gracefully.
-
-<P>
-
-You can also tell Apache to restart. This makes it re-read the
-configuration files. Any transactions in progress are allowed to
-complete without interruption. To restart Apache, run
-
-<PRE>
- apache -k restart
-</PRE>
-<BLOCKQUOTE>
- <STRONG>Note: This option is only available with Apache 1.3.3 and
- later. For earlier versions, you need to use Control-C in the
- Apache console window to shut down the server.</STRONG>
-</BLOCKQUOTE>
-
-<P>
-Note for people familiar with the Unix version of Apache: these
-commands provide a Windows equivalent to <CODE>kill -TERM
-<EM>pid</EM></CODE> and <CODE>kill -USR1 <EM>pid</EM></CODE>. The command
-line option used, <CODE>-k</CODE>, was chosen as a reminder of the
-"kill" command used on Unix.
-
-<H2><A NAME="comp">Compiling Apache for Windows</A></H2>
-
-<P>Compiling Apache requires Microsoft Visual C++ 5.0 (or later) to be
- properly installed. It is easiest to compile with the command-line tools
- (nmake, <EM>etc.</EM>..). Consult the VC++ manual to determine how to install
- them.</P>
-
-<P>First, unpack the Apache distribution into an appropriate
- directory. Open a command-line prompt, and change to the
- <CODE>src</CODE> subdirectory of the Apache distribution.</P>
-
-<P>The master Apache makefile instructions are contained in the
- <CODE>Makefile.win</CODE> file. To compile Apache on Windows, simply
- use one of the following commands:
-<UL>
-<LI><CODE>nmake /f Makefile.win _apacher</CODE> (release build)
-<LI><CODE>nmake /f Makefile.win _apached</CODE> (debug build)
-</UL>
-
-<P>These will both compile Apache. The latter will include debugging
- information in the resulting files, making it easier to find bugs and
- track down problems.</P>
-
-<P>Apache can also be compiled using VC++'s Visual Studio development
- environment. Although compiling Apache in this manner is not as
- simple, it makes it possible to easily modify the Apache source, or
- to compile Apache if the command-line tools are not installed.
- Project files (<CODE>.DSP</CODE>) are included for each of the
- portions of Apache. To build Apache from the these projects files
- you will need to build the following projects <EM>in this order</EM>:
-<STRONG> This needs updating for Apache 2.0 </STRONG>
- <OL>
- <LI><CODE>os\win32\ApacheOS.dsp</CODE>
- <LI><CODE>regex\regex.dsp</CODE>
- <LI><CODE>ap\ap.dsp</CODE>
- <LI><CODE>main\gen_uri_delims.dsp</CODE>
- <LI><CODE>main\gen_test_char.dsp</CODE>
- <LI><CODE>ApacheCore.dsp</CODE>
- <LI><CODE>Apache.dsp</CODE>
- </OL>
-
- In addition, the <CODE>src\os\win32</CODE> subdirectory contains
- project files for the optional modules (see below).</P>
-
-<P>Once Apache has been compiled, it needs to be installed in its server
- root directory. The default is the <CODE>\Apache</CODE>
- directory, on the current hard drive. </P>
-
-<P>To install the files into the <CODE>\Apache</CODE> directory
- automatically, use one the following nmake commands (see above):</P>
-<UL>
-<LI><CODE>nmake /f Makefile.win installr INSTDIR=<EM>dir</EM></CODE>
- (for release build)
-<LI><CODE>nmake /f Makefile.win installd INSTDIR=<EM>dir</EM></CODE>
- (for debug build)
-</UL>
-
-The dir argument to INSTDIR gives the installation directory; it can
-be omitted if Apache is to be installed into <SAMP>\Apache</SAMP>.
-
-<P>This will install the following:</P>
-
-<UL>
- <LI><CODE><EM>dir</EM>\Apache.exe</CODE> - Apache executable
- <LI><CODE><EM>dir</EM>\ApacheCore.dll</CODE> - Main Apache shared library
- <LI><CODE><EM>dir</EM>\modules\ApacheModule*.dll</CODE> - Optional Apache
- modules (7 files)
- <LI><CODE><EM>dir</EM>\conf</CODE> - Empty configuration directory
- <LI><CODE><EM>dir</EM>\logs</CODE> - Empty logging directory
-</UL>
-
-<P>If you do not have nmake, or wish to install in a different directory,
- be sure to use a similar naming scheme.</P>
-
-<P>
-Before running the server you must fill out the conf directory.
-Copy the *.conf-dist-win from the distribution conf directory
-and rename *.conf. Edit the @@ServerRoot@@ entries to your
-actual server root (for example "C:\apache"). Copy over
-the conf/magic and conf/mime.types files as well.
-
-<!--#include virtual="footer.html" -->
-</BODY>
-</HTML>
-
diff --git a/docs/manual/sections.html.en b/docs/manual/sections.html.en
deleted file mode 100644
index 88f3329408..0000000000
--- a/docs/manual/sections.html.en
+++ /dev/null
@@ -1,170 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<HTML><HEAD>
-<TITLE>How Directory, Location and Files sections work</TITLE>
-</HEAD>
-
-<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
-<BODY
- BGCOLOR="#FFFFFF"
- TEXT="#000000"
- LINK="#0000FF"
- VLINK="#000080"
- ALINK="#FF0000"
->
-<!--#include virtual="header.html" -->
-<H1 ALIGN="CENTER">How Directory, Location and Files sections work</H1>
-
-The sections <A
-HREF="mod/core.html#directory"><CODE>&lt;Directory&gt;</CODE></A>, <A
-HREF="mod/core.html#location"><CODE>&lt;Location&gt;</CODE></A> and <A
-HREF="mod/core.html#files"><CODE>&lt;Files&gt;</CODE></A> can contain
-directives which only apply to specified directories, URLs or files
-respectively. Also htaccess files can be used inside a directory to
-apply directives to that directory. This document explains how these
-different sections differ and how they relate to each other when
-Apache decides which directives apply for a particular directory or
-request URL.
-
-<H2>Directives allowed in the sections</H2>
-
-Everything that is syntactically allowed in
-<CODE>&lt;Directory&gt;</CODE> is also allowed in
-<CODE>&lt;Location&gt;</CODE> (except a sub-<CODE>&lt;Files&gt;</CODE>
-section). Semantically however some things, and the most
-notable are <CODE>AllowOverride</CODE> and the two options
-<CODE>FollowSymLinks</CODE> and <CODE>SymLinksIfOwnerMatch</CODE>,
-make no sense in <CODE>&lt;Location&gt;</CODE>,
-<CODE>&lt;LocationMatch&gt;</CODE> or <CODE>&lt;DirectoryMatch&gt;</CODE>.
-The same for <CODE>&lt;Files&gt;</CODE> -- syntactically everything
-is fine, but semantically some things are different.
-
-<H2>How the sections are merged</H2>
-
-The order of merging is:
-
-<OL>
-
-<LI>
-
- <CODE>&lt;Directory&gt;</CODE> (except regular expressions) and
- .htaccess done simultaneously (with .htaccess overriding
- <CODE>&lt;Directory&gt;</CODE>)
-
-</LI>
-
-<LI>
- <CODE>&lt;DirectoryMatch&gt;</CODE>, and
- <CODE>&lt;Directory&gt;</CODE> with regular expressions
-
-</LI>
-
- <LI><CODE>&lt;Files&gt;</CODE> and <CODE>&lt;FilesMatch&gt;</CODE> done
- simultaneously
- </LI>
-
- <LI><CODE>&lt;Location&gt;</CODE> and <CODE>&lt;LocationMatch&gt;</CODE> done
- simultaneously
- </LI>
-
-</OL>
-
-Apart from <CODE>&lt;Directory&gt;</CODE>, each group is processed in
-the order that they appear in the configuration
-files. <CODE>&lt;Directory&gt;</CODE> (group 1 above) is processed in
-the order shortest directory component to longest. If multiple
-<CODE>&lt;Directory&gt;</CODE> sections apply to the same directory
-they they are processed in the configuration file order. The
-configuration files are read in the order httpd.conf, srm.conf and
-access.conf. Configurations included via the <CODE>Include</CODE>
-directive will be treated as if they where inside the including file
-at the location of the <CODE>Include</CODE> directive.
-
-<P>
-
-Sections inside <CODE>&lt;VirtualHost&gt;</CODE> sections are applied
-<EM>after</EM> the corresponding sections outside the virtual host
-definition. This allows virtual hosts to override the main server
-configuration. (Note: this only works correctly from 1.2.2 and 1.3a2
-onwards. Before those releases sections inside virtual hosts were
-applied <EM>before</EM> the main server).
-
-<H2>Notes about using sections</H2>
-
-The general guidelines are:
-
-<P>
-
-<UL>
-<LI>
- If you are attempting to match objects at the filesystem level
- then you must use <CODE>&lt;Directory&gt;</CODE> and/or
- <CODE>&lt;Files&gt;</CODE>.
-</LI>
-
-<LI>
- If you are attempting to match objects at the URL level then you
- must use <CODE>&lt;Location&gt;</CODE>
-</LI>
-</UL>
-
-But a notable exception is:
-
-<UL>
-<LI>
- proxy control is done via <CODE>&lt;Directory&gt;</CODE>. This is
- a legacy mistake because the proxy existed prior to
- <CODE>&lt;Location&gt;</CODE>. A future version of the config
- language should probably switch this to
- <CODE>&lt;Location&gt;</CODE>.
-</LI>
-</UL>
-
-<P>
-Note about .htaccess parsing:
-</P>
-<UL>
-<LI>
- Modifying .htaccess parsing during Location doesn't do
- anything because .htaccess parsing has already occurred.
-</UL>
-
-<P>
-<CODE>&lt;Location&gt;</CODE> and symbolic links:
-</P>
-<UL>
-<LI>
- It is not possible to use "<CODE>Options FollowSymLinks</CODE>"
- or "<CODE>Options SymLinksIfOwnerMatch</CODE>" inside a
- <CODE>&lt;Location&gt;</CODE>, <CODE>&lt;LocationMatch&gt;</CODE>
- or <CODE>&lt;DirectoryMatch&gt;</CODE> section
- (the options are simply ignored).
- Using the options in question is only possible inside a
- <CODE>&lt;Directory&gt;</CODE> section (or a <CODE>.htaccess</CODE> file).
-</UL>
-
-<P>
-<CODE>&lt;Files&gt;</CODE> and <CODE>Options</CODE>:
-</P>
-<UL>
-<LI>
- Apache won't check for it, but using an <CODE>Options</CODE>
- directive inside a <CODE>&lt;Files&gt;</CODE> section has no effect.
-</UL>
-
-<P>
-Another note:
-</P>
-
-<UL>
-<LI>
- There is actually a
- <CODE>&lt;Location&gt;</CODE>/<CODE>&lt;LocationMatch&gt;</CODE>
- sequence performed just before the name translation phase (where
- <CODE>Aliases</CODE> and <CODE>DocumentRoots</CODE> are used to
- map URLs to filenames). The results of this sequence are
- completely thrown away after the translation has completed.
-</LI>
-</UL>
-
-<!--#include virtual="footer.html" -->
-</BODY></HTML>
diff --git a/docs/manual/stopping.html.en b/docs/manual/stopping.html.en
deleted file mode 100644
index 783d1c0250..0000000000
--- a/docs/manual/stopping.html.en
+++ /dev/null
@@ -1,183 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<HTML>
-<HEAD>
-<TITLE>Stopping and Restarting Apache</TITLE>
-</HEAD>
-
-<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
-<BODY
- BGCOLOR="#FFFFFF"
- TEXT="#000000"
- LINK="#0000FF"
- VLINK="#000080"
- ALINK="#FF0000"
->
-<!--#include virtual="header.html" -->
-<H1 ALIGN="CENTER">Stopping and Restarting Apache</H1>
-
-<P>This document covers stopping and restarting Apache on Unix
-only. Windows users should see <A HREF="windows.html#signal">Signalling
-Apache when running</A>.</P>
-
-<P>You will notice many <CODE>httpd</CODE> executables running on your system,
-but you should not send signals to any of them except the parent, whose
-pid is in the <A HREF="mod/core.html#pidfile">PidFile</A>. That is to
-say you shouldn't ever need to send signals to any process except the
-parent. There are three signals that you can send the parent:
-<CODE>TERM</CODE>, <CODE>HUP</CODE>, and <CODE>USR1</CODE>, which will
-be described in a moment.
-
-<P>To send a signal to the parent you should issue a command such as:
-<BLOCKQUOTE><PRE>
- kill -TERM `cat /usr/local/apache/logs/httpd.pid`
-</PRE></BLOCKQUOTE>
-
-You can read about its progress by issuing:
-
-<BLOCKQUOTE><PRE>
- tail -f /usr/local/apache/logs/error_log
-</PRE></BLOCKQUOTE>
-
-Modify those examples to match your
-<A HREF="mod/core.html#serverroot">ServerRoot</A> and
-<A HREF="mod/core.html#pidfile">PidFile</A> settings.
-
-<P>As of Apache 1.3 we provide a script <CODE>src/support/apachectl</CODE>
-which can be used to start, stop, and restart Apache. It may need a
-little customization for your system, see the comments at the top of
-the script.
-
-<H3>TERM Signal: stop now</H3>
-
-<P>Sending the <CODE>TERM</CODE> signal to the parent causes it to
-immediately attempt to kill off all of its children. It may take it
-several seconds to complete killing off its children. Then the
-parent itself exits. Any requests in progress are terminated, and no
-further requests are served.
-
-<H3>HUP Signal: restart now</H3>
-
-<P>Sending the <CODE>HUP</CODE> signal to the parent causes it to kill off
-its children like in <CODE>TERM</CODE> but the parent doesn't exit. It
-re-reads its configuration files, and re-opens any log files.
-Then it spawns a new set of children and continues
-serving hits.
-
-<P>Users of the
-<A HREF="mod/mod_status.html">status module</A>
-will notice that the server statistics are
-set to zero when a <CODE>HUP</CODE> is sent.
-
-<P><STRONG>Note:</STRONG> If your configuration file has errors in it when
-you issue a
-restart then your parent will not restart, it will exit with an error.
-See below for a method of avoiding this.
-
-<H3>USR1 Signal: graceful restart</H3>
-
-<P><STRONG>Note:</STRONG> prior to release 1.2b9 this code is quite unstable
-and shouldn't be used at all.
-
-<P>The <CODE>USR1</CODE> signal causes the parent process to <EM>advise</EM>
-the children to exit after their current request (or to exit immediately
-if they're not serving anything). The parent re-reads its configuration
-files and re-opens its log files. As each child dies off the parent
-replaces it with a child from the new <EM>generation</EM> of the
-configuration, which begins serving new requests immediately.
-
-<P>This code is designed to always respect the
-<A HREF="mod/core.html#maxclients">MaxClients</A>,
-<A HREF="mod/core.html#minspareservers">MinSpareServers</A>,
-and <A HREF="mod/core.html#maxspareservers">MaxSpareServers</A> settings.
-Furthermore, it respects <A HREF="mod/core.html#startservers">StartServers</A>
-in the following manner: if after one second at least StartServers new
-children have not been created, then create enough to pick up the slack.
-This is to say that the code tries to maintain both the number of children
-appropriate for the current load on the server, and respect your wishes
-with the StartServers parameter.
-
-<P>Users of the
-<A HREF="mod/mod_status.html">status module</A>
-will notice that the server statistics
-are <STRONG>not</STRONG> set to zero when a <CODE>USR1</CODE> is sent. The
-code
-was written to both minimize the time in which the server is unable to serve
-new requests (they will be queued up by the operating system, so they're
-not lost in any event) and to respect your tuning parameters. In order
-to do this it has to keep the <EM>scoreboard</EM> used to keep track
-of all children across generations.
-
-<P>The status module will also use a <CODE>G</CODE> to indicate those
-children which are still serving requests started before the graceful
-restart was given.
-
-<P>At present there is no way for a log rotation script using
-<CODE>USR1</CODE> to know for certain that all children writing the
-pre-restart log have finished. We suggest that you use a suitable delay
-after sending the <CODE>USR1</CODE> signal before you do anything with the
-old log. For example if most of your hits take less than 10 minutes to
-complete for users on low bandwidth links then you could wait 15 minutes
-before doing anything with the old log.
-
-<P><STRONG>Note:</STRONG> If your configuration file has errors in it when
-you issue a
-restart then your parent will not restart, it will exit with an error.
-In the case of graceful
-restarts it will also leave children running when it exits. (These are
-the children which are "gracefully exiting" by handling their last request.)
-This will cause problems if you attempt to restart the server -- it will
-not be able to bind to its listening ports. Before doing a restart, you
-can check the syntax of the configuration files with the <CODE>-t</CODE>
-command line argument (see <A HREF="invoking.html">Starting
-Apache</A>). This still will not guarantee that the server will restart
-correctly. To check the semantics of the configuration files as well
-as the syntax, you can try starting httpd as a non-root user. If
-there are no errors it will attempt to open its sockets and logs and
-fail because it's not root (or because the currently running httpd
-already has those ports bound). If it fails for any other reason then
-it's probably a config file error and the error should be fixed before
-issuing the graceful restart.
-
-
-<H3>Appendix: signals and race conditions</H3>
-
-<P>Prior to Apache 1.2b9 there were several <EM>race conditions</EM>
-involving the restart and die signals (a simple description of race
-condition is: a time-sensitive problem, as in if something happens at just
-the wrong time it won't behave as expected). For those architectures that
-have the "right" feature set we have eliminated as many as we can.
-But it should be noted that there still do exist race conditions on
-certain architectures.
-
-<P>Architectures that use an on disk
-<A HREF="mod/core.html#scoreboardfile">ScoreBoardFile</A>
-have the potential to corrupt their scoreboards. This can result in
-the "bind: Address already in use" (after <CODE>HUP</CODE>) or
-"long lost child came home!" (after <CODE>USR1</CODE>). The former is
-a fatal error, while the latter just causes the server to lose a scoreboard
-slot. So it might be advisable to use graceful restarts, with
-an occasional hard restart. These problems are very difficult to work
-around, but fortunately most architectures do not require a scoreboard file.
-See the ScoreBoardFile documentation for a method to determine if your
-architecture uses it.
-
-<P><CODE>NEXT</CODE> and <CODE>MACHTEN</CODE> (68k only) have small race
-conditions
-which can cause a restart/die signal to be lost, but should not cause the
-server to do anything otherwise problematic.
-<!-- they don't have sigaction, or we're not using it -djg -->
-
-<P>All architectures have a small race condition in each child involving
-the second and subsequent requests on a persistent HTTP connection
-(KeepAlive). It may exit after reading the request line but before
-reading any of the request headers. There is a fix that was discovered
-too late to make 1.2. In theory this isn't an issue because the KeepAlive
-client has to expect these events because of network latencies and
-server timeouts. In practice it doesn't seem to affect anything either
--- in a test case the server was restarted twenty times per second and
-clients successfully browsed the site without getting broken images or
-empty documents.
-
-<!--#include virtual="footer.html" -->
-</BODY>
-</HTML>
diff --git a/docs/manual/suexec.html.en b/docs/manual/suexec.html.en
deleted file mode 100644
index 3d8623df04..0000000000
--- a/docs/manual/suexec.html.en
+++ /dev/null
@@ -1,518 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<HTML>
-<HEAD>
-<TITLE>Apache suEXEC Support</TITLE>
-</HEAD>
-<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
-<BODY
- BGCOLOR="#FFFFFF"
- TEXT="#000000"
- LINK="#0000FF"
- VLINK="#000080"
- ALINK="#FF0000"
->
-<!--#include virtual="header.html" -->
-
-<H1 ALIGN="CENTER">Apache suEXEC Support</H1>
-
-<P ALIGN="LEFT">
-<OL>
- <LI><BIG><STRONG>CONTENTS</STRONG></BIG></LI>
- <LI><A HREF="#what">What is suEXEC?</A></LI>
- <LI><A HREF="#before">Before we begin.</A></LI>
- <LI><A HREF="#model">suEXEC Security Model.</A></LI>
- <LI><A HREF="#install">Configuring &amp; Installing suEXEC</A></LI>
- <LI><A HREF="#enable">Enabling &amp; Disabling suEXEC</A></LI>
- <LI><A HREF="#usage">Using suEXEC</A></LI>
- <LI><A HREF="#debug">Debugging suEXEC</A></LI>
- <LI><A HREF="#jabberwock">Beware the Jabberwock: Warnings &amp;
- Examples</A></LI>
-</OL>
-</P>
-
-<H3><A NAME="what">What is suEXEC?</A></H3>
-<P ALIGN="LEFT">
-The <STRONG>suEXEC</STRONG> feature -- introduced in Apache 1.2 -- provides
-Apache users the ability to run <STRONG>CGI</STRONG> and <STRONG>SSI</STRONG>
-programs under user IDs different from the user ID of the calling web-server.
-Normally, when a CGI or SSI program executes, it runs as the same user who is
-running the web server.
-</P>
-
-<P ALIGN="LEFT">
-Used properly, this feature can reduce considerably the security risks involved
-with allowing users to develop and run private CGI or SSI programs. However,
-if suEXEC is improperly configured, it can cause any number of problems and
-possibly create new holes in your computer's security. If you aren't familiar
-with managing setuid root programs and the security issues they present, we
-highly recommend that you not consider using suEXEC.
-</P>
-
-<P ALIGN="CENTER">
-<STRONG><A HREF="suexec.html">BACK TO CONTENTS</A></STRONG>
-</P>
-
-<H3><A NAME="before">Before we begin.</A></H3>
-<P ALIGN="LEFT">
-Before jumping head-first into this document, you should be aware of the
-assumptions made on the part of the Apache Group and this document.
-</P>
-
-<P ALIGN="LEFT">
-First, it is assumed that you are using a UNIX derivate operating system that
-is capable of <STRONG>setuid</STRONG> and <STRONG>setgid</STRONG> operations.
-All command examples are given in this regard. Other platforms, if they are
-capable of supporting suEXEC, may differ in their configuration.
-</P>
-
-<P ALIGN="LEFT">
-Second, it is assumed you are familiar with some basic concepts of your
-computer's security and its administration. This involves an understanding
-of <STRONG>setuid/setgid</STRONG> operations and the various effects they
-may have on your system and its level of security.
-</P>
-
-<P ALIGN="LEFT">
-Third, it is assumed that you are using an <STRONG>unmodified</STRONG>
-version of suEXEC code. All code for suEXEC has been carefully scrutinized and
-tested by the developers as well as numerous beta testers. Every precaution
-has been taken to ensure a simple yet solidly safe base of code. Altering this
-code can cause unexpected problems and new security risks. It is
-<STRONG>highly</STRONG> recommended you not alter the suEXEC code unless you
-are well versed in the particulars of security programming and are willing to
-share your work with the Apache Group for consideration.
-</P>
-
-<P ALIGN="LEFT">
-Fourth, and last, it has been the decision of the Apache Group to
-<STRONG>NOT</STRONG> make suEXEC part of the default installation of Apache.
-To this end, suEXEC configuration requires of the administrator careful
-attention to details. After due consideration has been given to the various
-settings for suEXEC, the administrator may install suEXEC through normal
-installation methods. The values for these settings need to be carefully
-determined and specified by the administrator to properly maintain system
-security during the use of suEXEC functionality. It is through this detailed
-process that the Apache Group hopes to limit suEXEC installation only to those
-who are careful and determined enough to use it.
-</P>
-
-<P ALIGN="LEFT">
-Still with us? Yes? Good. Let's move on!
-</P>
-
-<P ALIGN="CENTER">
-<STRONG><A HREF="suexec.html">BACK TO CONTENTS</A></STRONG>
-</P>
-
-<H3><A NAME="model">suEXEC Security Model</A></H3>
-<P ALIGN="LEFT">
-Before we begin configuring and installing suEXEC, we will first discuss
-the security model you are about to implement. By doing so, you may
-better understand what exactly is going on inside suEXEC and what precautions
-are taken to ensure your system's security.
-</P>
-
-<P ALIGN="LEFT">
-<STRONG>suEXEC</STRONG> is based on a setuid "wrapper" program that is
-called by the main Apache web server. This wrapper is called when an HTTP
-request is made for a CGI or SSI program that the administrator has designated
-to run as a userid other than that of the main server. When such a request
-is made, Apache provides the suEXEC wrapper with the program's name and the
-user and group IDs under which the program is to execute.
-</P>
-
-<P ALIGN="LEFT">
-The wrapper then employs the following process to determine success or
-failure -- if any one of these conditions fail, the program logs the failure
-and exits with an error, otherwise it will continue:
-<OL>
- <LI><STRONG>Was the wrapper called with the proper number of
- arguments?</STRONG>
- <BLOCKQUOTE>
- The wrapper will only execute if it is given the proper number of arguments.
- The proper argument format is known to the Apache web server. If the
- wrapper
- is not receiving the proper number of arguments, it is either being hacked,
- or
- there is something wrong with the suEXEC portion of your Apache binary.
- </BLOCKQUOTE>
- </LI>
- <LI><STRONG>Is the user executing this wrapper a valid user of this
- system?</STRONG>
- <BLOCKQUOTE>
- This is to ensure that the user executing the wrapper is truly a user of the
- system.
- </BLOCKQUOTE>
- </LI>
- <LI><STRONG>Is this valid user allowed to run the wrapper?</STRONG>
- <BLOCKQUOTE>
- Is this user the user allowed to run this wrapper? Only one user (the
- Apache user) is allowed to execute this program.
- </BLOCKQUOTE>
- </LI>
- <LI><STRONG>Does the target program have an unsafe hierarchical
- reference?</STRONG>
- <BLOCKQUOTE>
- Does the target program contain a leading '/' or have a '..' backreference?
- These are not allowed; the target program must reside within the Apache
- webspace.
- </BLOCKQUOTE>
- </LI>
- <LI><STRONG>Is the target user name valid?</STRONG>
- <BLOCKQUOTE>
- Does the target user exist?
- </BLOCKQUOTE>
- </LI>
- <LI><STRONG>Is the target group name valid?</STRONG>
- <BLOCKQUOTE>
- Does the target group exist?
- </BLOCKQUOTE>
- </LI>
- <LI><STRONG>Is the target user <EM>NOT</EM> superuser?</STRONG>
- <BLOCKQUOTE>
- Presently, suEXEC does not allow 'root' to execute CGI/SSI programs.
- </BLOCKQUOTE>
- </LI>
- <LI><STRONG>Is the target userid <EM>ABOVE</EM> the minimum ID
- number?</STRONG>
- <BLOCKQUOTE>
- The minimum user ID number is specified during configuration. This allows
- you
- to set the lowest possible userid that will be allowed to execute CGI/SSI
- programs. This is useful to block out "system" accounts.
- </BLOCKQUOTE>
- </LI>
- <LI><STRONG>Is the target group <EM>NOT</EM> the superuser group?</STRONG>
- <BLOCKQUOTE>
- Presently, suEXEC does not allow the 'root' group to execute CGI/SSI
- programs.
- </BLOCKQUOTE>
- </LI>
- <LI><STRONG>Is the target groupid <EM>ABOVE</EM> the minimum ID
- number?</STRONG>
- <BLOCKQUOTE>
- The minimum group ID number is specified during configuration. This allows
- you
- to set the lowest possible groupid that will be allowed to execute CGI/SSI
- programs. This is useful to block out "system" groups.
- </BLOCKQUOTE>
- </LI>
- <LI><STRONG>Can the wrapper successfully become the target user and
- group?</STRONG>
- <BLOCKQUOTE>
- Here is where the program becomes the target user and group via setuid and
- setgid
- calls. The group access list is also initialized with all of the groups
- of which
- the user is a member.
- </BLOCKQUOTE>
- </LI>
- <LI><STRONG>Does the directory in which the program resides exist?</STRONG>
- <BLOCKQUOTE>
- If it doesn't exist, it can't very well contain files.
- </BLOCKQUOTE>
- </LI>
- <LI><STRONG>Is the directory within the Apache webspace?</STRONG>
- <BLOCKQUOTE>
- If the request is for a regular portion of the server, is the requested
- directory
- within the server's document root? If the request is for a UserDir, is
- the requested
- directory within the user's document root?
- </BLOCKQUOTE>
- </LI>
- <LI><STRONG>Is the directory <EM>NOT</EM> writable by anyone else?</STRONG>
- <BLOCKQUOTE>
- We don't want to open up the directory to others; only the owner user
- may be able
- to alter this directories contents.
- </BLOCKQUOTE>
- </LI>
- <LI><STRONG>Does the target program exist?</STRONG>
- <BLOCKQUOTE>
- If it doesn't exists, it can't very well be executed.
- </BLOCKQUOTE>
- </LI>
- <LI><STRONG>Is the target program <EM>NOT</EM> writable by anyone
- else?</STRONG>
- <BLOCKQUOTE>
- We don't want to give anyone other than the owner the ability to
- change the program.
- </BLOCKQUOTE>
- </LI>
- <LI><STRONG>Is the target program <EM>NOT</EM> setuid or setgid?</STRONG>
- <BLOCKQUOTE>
- We do not want to execute programs that will then change our UID/GID again.
- </BLOCKQUOTE>
- </LI>
- <LI><STRONG>Is the target user/group the same as the program's
- user/group?</STRONG>
- <BLOCKQUOTE>
- Is the user the owner of the file?
- </BLOCKQUOTE>
- </LI>
- <LI><STRONG>Can we successfully clean the process environment to
- ensure safe operations?</STRONG>
- <BLOCKQUOTE>
- suEXEC cleans the process' environment by establishing a safe
- execution PATH (defined
- during configuration), as well as only passing through those
- variables whose names
- are listed in the safe environment list (also created during
- configuration).
- </BLOCKQUOTE>
- </LI>
- <LI><STRONG>Can we successfully become the target program and
- execute?</STRONG>
- <BLOCKQUOTE>
- Here is where suEXEC ends and the target program begins.
- </BLOCKQUOTE>
- </LI>
-</OL>
-</P>
-
-<P ALIGN="LEFT">
-This is the standard operation of the the suEXEC wrapper's security model.
-It is somewhat stringent and can impose new limitations and guidelines for
-CGI/SSI design, but it was developed carefully step-by-step with security
-in mind.
-</P>
-
-<P ALIGN="LEFT">
-For more information as to how this security model can limit your possibilities
-in regards to server configuration, as well as what security risks can be
-avoided with a proper suEXEC setup, see the
-<A HREF="#jabberwock">"Beware the Jabberwock"</A>
-section of this document.
-</P>
-
-<P ALIGN="CENTER">
-<STRONG><A HREF="suexec.html">BACK TO CONTENTS</A></STRONG>
-</P>
-
-<H3><A NAME="install">Configuring &amp; Installing suEXEC</A></H3>
-<P ALIGN="LEFT">
-Here's where we begin the fun. If you use Apache 1.2 or prefer to configure
-Apache 1.3 with the "<CODE>src/Configure</CODE>" script you have to edit
-the suEXEC header file and install the binary in its proper location
-manually. This procedure is described in an
-<A HREF="suexec_1_2.html">extra document</A>.
-The following sections describe the configuration and installation
-for Apache 1.3 with the AutoConf-style interface (APACI).
-</P>
-
-<P ALIGN="LEFT">
-<STRONG>APACI's suEXEC configuration options</STRONG><BR>
-<DL>
-<DT><CODE>--enable-suexec</CODE>
-<DD>This option enables the suEXEC feature which is never installed or
- activated by default. At least one --suexec-xxxxx option has to be
- provided together with the --enable-suexec option to let APACI
- accept your request for using the suEXEC feature.
-<DT><CODE>--suexec-caller=<EM>UID</EM></CODE>
-<DD>The <A HREF="mod/core.html#user">username</A> under which
- Apache normally runs.
- This is the only user allowed to execute this program.
-<DT><CODE>--suexec-docroot=<EM>DIR</EM></CODE>
-<DD>Define as the DocumentRoot set for Apache.
- This will be the only hierarchy (aside from UserDirs)
- that can be used for suEXEC behavior.
- The default directory is the --datadir value with
- the suffix "/htdocs", <EM>e.g.</EM> if you configure with
- "<CODE>--datadir=/home/apache</CODE>" the directory
- "/home/apache/htdocs" is used as document root for
- the suEXEC wrapper.
-<DT><CODE>--suexec-logfile=<EM>FILE</EM></CODE>
-<DD>This defines the filename to which all suEXEC transactions and
- errors are logged (useful for auditing and debugging purposes).
- By default the logfile is named "suexec_log" and located in your
- standard logfile directory (--logfiledir).
-<DT><CODE>--suexec-userdir=<EM>DIR</EM></CODE>
-<DD>Define to be the subdirectory under users'
- home directories where suEXEC access should
- be allowed. All executables under this directory
- will be executable by suEXEC as the user so
- they should be "safe" programs. If you are
- using a "simple" UserDir directive (ie. one
- without a "*" in it) this should be set to
- the same value. suEXEC will not work properly
- in cases where the UserDir directive points to
- a location that is not the same as the user's
- home directory as referenced in the passwd file.
- Default value is "public_html".
- <BR>
- If you have virtual hosts with a different
- UserDir for each, you will need to define them to
- all reside in one parent directory; then name that
- parent directory here. <STRONG>If this is not defined
- properly, "~userdir" cgi requests will not work!</STRONG>
-<DT><CODE>--suexec-uidmin=<EM>UID</EM></CODE>
-<DD>Define this as the lowest UID allowed to be a target user
- for suEXEC. For most systems, 500 or 100 is common.
- Default value is 100.
-<DT><CODE>--suexec-gidmin=<EM>GID</EM></CODE>
-<DD>Define this as the lowest GID allowed to be a target group
- for suEXEC. For most systems, 100 is common and therefore
- used as default value.
-<DT><CODE>--suexec-safepath=<EM>PATH</EM></CODE>
-<DD>Define a safe PATH environment to pass to CGI executables.
- Default value is "/usr/local/bin:/usr/bin:/bin".
-</DL>
-</P>
-
-<P ALIGN="LEFT">
-<STRONG>Checking your suEXEC setup</STRONG><BR>
-Before you compile and install the suEXEC wrapper you can check
-the configuration with the --layout option.
-<BR>
-Example output:
-<PRE>
- suEXEC setup:
- suexec binary: /usr/local/apache/sbin/suexec
- document root: /usr/local/apache/share/htdocs
- userdir suffix: public_html
- logfile: /usr/local/apache/var/log/suexec_log
- safe path: /usr/local/bin:/usr/bin:/bin
- caller ID: www
- minimum user ID: 100
- minimum group ID: 100
-</PRE>
-</P>
-
-<P ALIGN="LEFT">
-<STRONG>Compiling and installing the suEXEC wrapper</STRONG><BR>
-If you have enabled the suEXEC feature with the --enable-suexec option
-the suexec binary (together with Apache itself) is automatically built
-if you execute the command "make".
-<BR>
-After all components have been built you can execute the command
-"make install" to install them.
-The binary image "suexec" is installed in the directory defined by
-the --sbindir option. Default location is "/usr/local/apache/sbin/suexec".
-<BR>
-Please note that you need <STRONG><EM>root privileges</EM></STRONG> for
-the installation step. In order for the wrapper to set the user ID, it
-must be installed as owner <CODE><EM>root</EM></CODE> and must have the
-setuserid execution bit set for file modes.
-</P>
-
-<P ALIGN="CENTER">
-<STRONG><A HREF="suexec.html">BACK TO CONTENTS</A></STRONG>
-</P>
-
-<H3><A NAME="enable">Enabling &amp; Disabling suEXEC</A></H3>
-<P ALIGN="LEFT">
-Upon startup of Apache, it looks for the file "suexec" in the "sbin"
-directory (default is "/usr/local/apache/sbin/suexec").
-If Apache finds a properly configured suEXEC wrapper, it will print
-the following message to the error log:
-<PRE>
- [notice] suEXEC mechanism enabled (wrapper: <EM>/path/to/suexec</EM>)
-</PRE>
-If you don't see this message at server startup, the server is most
-likely not finding the wrapper program where it expects it, or the
-executable is not installed <EM>setuid root</EM>.
-<BR>
-If you want to enable the suEXEC mechanism for the first time
-and an Apache server is already running you must kill and restart Apache.
-Restarting it with a simple HUP or USR1 signal will not be enough.
-<BR>
-If you want to disable suEXEC you should kill and restart Apache after
-you have removed the "suexec" file.
-</P>
-
-<P ALIGN="CENTER">
-<STRONG><A HREF="suexec.html">BACK TO CONTENTS</A></STRONG>
-</P>
-
-<H3><A NAME="usage">Using suEXEC</A></H3>
-<P ALIGN="LEFT">
-<STRONG>Virtual Hosts:</STRONG><BR>
-One way to use the suEXEC wrapper is through the
-<A HREF="mod/core.html#user">User</A> and
-<A HREF="mod/core.html#group">Group</A> directives in
-<A HREF="mod/core.html#virtualhost">VirtualHost</A>
-definitions. By setting these directives to values different from the
-main server user ID, all requests for CGI resources will be executed as
-the <EM>User</EM> and <EM>Group</EM> defined for that
-<CODE>&lt;VirtualHost&gt;</CODE>. If only one or
-neither of these directives are specified for a
-<CODE>&lt;VirtualHost&gt;</CODE> then the main
-server userid is assumed.
-<P>
-<STRONG>User directories:</STRONG><BR>
-The suEXEC wrapper can also be used to execute CGI programs as
-the user to which the request is being directed. This is accomplished by
-using the "<STRONG><CODE>~</CODE></STRONG>" character prefixing the user
-ID for whom execution is desired.
-The only requirement needed for this feature to work is for CGI
-execution to be enabled for the user and that the script must meet the
-scrutiny of the <A HREF="#model">security checks</A> above.
-
-<P ALIGN="CENTER">
-<STRONG><A HREF="suexec.html">BACK TO CONTENTS</A></STRONG>
-</P>
-
-<H3><A NAME="debug">Debugging suEXEC</A></H3>
-<P ALIGN="LEFT">
-The suEXEC wrapper will write log information to the file defined
-with the --suexec-logfile option as indicated above. If you feel you have
-configured and installed the wrapper properly, have a look at this log
-and the error_log for the server to see where you may have gone astray.
-</P>
-
-<P ALIGN="CENTER">
-<STRONG><A HREF="suexec.html">BACK TO CONTENTS</A></STRONG>
-</P>
-
-<H3>
-<A NAME="jabberwock">Beware the Jabberwock: Warnings &amp; Examples</A>
-</H3>
-<P ALIGN="LEFT">
-<STRONG>NOTE!</STRONG> This section may not be complete. For the latest
-revision of this section of the documentation, see the Apache Group's
-<A HREF="http://www.apache.org/docs/suexec.html">Online Documentation</A>
-version.
-</P>
-
-<P ALIGN="LEFT">
-There are a few points of interest regarding the wrapper that can cause
-limitations on server setup. Please review these before submitting any
-"bugs" regarding suEXEC.
-<UL>
- <LI><STRONG>suEXEC Points Of Interest</STRONG></LI>
- <LI>Hierarchy limitations
- <BLOCKQUOTE>
- For security and efficiency reasons, all suexec requests must
- remain within either a top-level document root for virtual
- host requests, or one top-level personal document root for
- userdir requests. For example, if you have four VirtualHosts
- configured, you would need to structure all of your VHosts'
- document roots off of one main Apache document hierarchy to
- take advantage of suEXEC for VirtualHosts. (Example forthcoming.)
- </BLOCKQUOTE>
- </LI>
- <LI>suEXEC's PATH environment variable
- <BLOCKQUOTE>
- This can be a dangerous thing to change. Make certain every
- path you include in this define is a <STRONG>trusted</STRONG>
- directory. You don't want to open people up to having someone
- from across the world running a trojan horse on them.
- </BLOCKQUOTE>
- </LI>
- <LI>Altering the suEXEC code
- <BLOCKQUOTE>
- Again, this can cause <STRONG>Big Trouble</STRONG> if you try
- this without knowing what you are doing. Stay away from it
- if at all possible.
- </BLOCKQUOTE>
- </LI>
-</UL>
-
-<P ALIGN="CENTER">
-<STRONG><A HREF="suexec.html">BACK TO CONTENTS</A></STRONG>
-</P>
-
-<!--#include virtual="footer.html" -->
-</BODY>
-</HTML>
diff --git a/docs/manual/vhosts/fd-limits.html.en b/docs/manual/vhosts/fd-limits.html.en
deleted file mode 100644
index 6b9d0f93c4..0000000000
--- a/docs/manual/vhosts/fd-limits.html.en
+++ /dev/null
@@ -1,59 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<HTML>
-<HEAD>
-<TITLE>Apache Server Virtual Host Support</TITLE>
-</HEAD>
-
-<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
-<BODY
- BGCOLOR="#FFFFFF"
- TEXT="#000000"
- LINK="#0000FF"
- VLINK="#000080"
- ALINK="#FF0000"
->
-<!--#include virtual="header.html" -->
-<H1 ALIGN="CENTER">File Descriptor Limits</H1>
-
-<P>
-When using a large number of Virtual Hosts, Apache may run out of available
-file descriptors (sometimes called <CITE>file handles</CITE> if each Virtual
-Host specifies different log files.
-The total number of file descriptors used by Apache is one for each distinct
-error log file, one for every other log file directive, plus 10-20 for
-internal use. Unix operating systems limit the number of file descriptors that
-may be used by a process; the limit is typically 64, and may usually be
-increased up to a large hard-limit.
-<P>
-Although Apache attempts to increase the limit as required, this
-may not work if:
-<OL>
-<LI>Your system does not provide the setrlimit() system call.
-<LI>The setrlimit(RLIMIT_NOFILE) call does not function on your system
- (such as Solaris 2.3)
-<LI>The number of file descriptors required exceeds the hard limit.
-<LI>Your system imposes other limits on file descriptors, such as a limit
-on stdio streams only using file descriptors below 256. (Solaris 2)
-</OL>
-
-In the event of problems you can:
-<UL>
-<LI>Reduce the number of log files; don't specify log files in the VirtualHost
-sections, but only log to the main log files.
-<LI>If you system falls into 1 or 2 (above), then increase the file descriptor
-limit before starting Apache, using a script like
-<BLOCKQUOTE><CODE>
-#!/bin/sh <BR>
-ulimit -S -n 100 <BR>
-exec httpd</CODE></BLOCKQUOTE>
-</UL>
-<P>
-Please see the
-<A HREF="../misc/descriptors.html">Descriptors and Apache</A>
-document containing further details about file descriptor problems and how
-they can be solved on your operating system.
-</P>
-
-<!--#include virtual="footer.html" -->
-</BODY></HTML>
-
diff --git a/docs/manual/vhosts/index.html.en b/docs/manual/vhosts/index.html.en
deleted file mode 100644
index 06fcf1d16f..0000000000
--- a/docs/manual/vhosts/index.html.en
+++ /dev/null
@@ -1,65 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<HTML>
-<HEAD>
-<TITLE>Apache Virtual Host documentation</TITLE>
-</HEAD>
-
-<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
-<BODY
- BGCOLOR="#FFFFFF"
- TEXT="#000000"
- LINK="#0000FF"
- VLINK="#000080"
- ALINK="#FF0000"
->
-<!--#include virtual="header.html" -->
-<H1 ALIGN="CENTER">Apache Virtual Host documentation</H1>
-
-<P>The term <CITE>Virtual Host</CITE> refers to the practice of maintaining
-more than one server on one machine, as differentiated by their apparent
-hostname. For example, it is often desirable for companies sharing a
-web server to have their own domains, with web servers accessible as
-<SAMP>www.company1.com</SAMP> and <SAMP>www.company2.com</SAMP>,
-without requiring the user to know any extra path information.</P>
-
-<P>Apache was one of the first servers to support IP-based
-virtual hosts right out of the box. Versions 1.1 and later of
-Apache support both, IP-based and name-based virtual hosts (vhosts).
-The latter variant of virtual hosts is sometimes also called host-based or
-non-IP virtual hosts.</P>
-
-<P>Below is a list of documentation pages which explain all details
-of virtual host support in Apache version 1.3 and later.</P>
-
-<HR>
-
-<H2>Virtual Host Support</H2>
-
-<UL>
-<LI><A HREF="ip-based.html">IP-based Virtual Hosts</A>
-<LI><A HREF="name-based.html">Name-based Virtual Hosts</A>
-<LI><A HREF="examples.html">Virtual Host examples for common setups</A>
-<LI><A HREF="details.html">In-Depth Discussion of Virtual Host Matching</A>
-<LI><A HREF="fd-limits.html">File Descriptor Limits</A>
-<LI><A HREF="mass.html">Dynamically Configured Mass Virtual Hosting</A>
-</UL>
-
-<H2>Configuration directives</H2>
-
-<UL>
-<LI><A HREF="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</A>
-<LI><A HREF="../mod/core.html#namevirtualhost">NameVirtualHost</A>
-<LI><A HREF="../mod/core.html#servername">ServerName</A>
-<LI><A HREF="../mod/core.html#serveralias">ServerAlias</A>
-<LI><A HREF="../mod/core.html#serverpath">ServerPath</A>
-</UL>
-
-<P>Folks trying to debug their virtual host configuration may find the
-Apache <CODE>-S</CODE> command line switch useful. It will dump out a
-description of how Apache parsed the configuration file. Careful
-examination of the IP addresses and server names may help uncover
-configuration mistakes.
-
-<!--#include virtual="footer.html" -->
-</BODY>
-</HTML>
diff --git a/docs/manual/vhosts/name-based.html.en b/docs/manual/vhosts/name-based.html.en
deleted file mode 100644
index 238cf5c721..0000000000
--- a/docs/manual/vhosts/name-based.html.en
+++ /dev/null
@@ -1,164 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<HTML><HEAD>
-<TITLE>Apache name-based Virtual Hosts</TITLE>
-</HEAD>
-
-<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
-<BODY
- BGCOLOR="#FFFFFF"
- TEXT="#000000"
- LINK="#0000FF"
- VLINK="#000080"
- ALINK="#FF0000"
->
-<!--#include virtual="header.html" -->
-<H1 ALIGN="CENTER">Apache name-based Virtual Host Support</H1>
-
-<STRONG>See Also:</STRONG>
-<A HREF="ip-based.html">IP-based Virtual Host Support</A>
-
-<HR>
-
-<H2>Name-based vs. IP-based virtual hosts</H2>
-
-<P>While the approach with IP-based virtual hosts works very well,
-it is not the most elegant solution, because a dedicated IP address
-is needed for every virtual host and it is hard to implement on some
-machines. The <CODE>HTTP/1.1</CODE> protocol contains a method for the
-server to identify what name it is being addressed as. Apache 1.1 and
-later support this approach as well as the traditional
-IP-address-per-hostname method.</P>
-
-<P>The benefits of using the new name-based virtual host support is a
-practically unlimited number of servers, ease of configuration and use, and
-requires no additional hardware or software.
-The main disadvantage is that the client must support this part of the
-protocol. The latest versions of most browsers do, but there are still
-old browsers in use who do not. This can cause problems, although a possible
-solution is addressed below.</P>
-
-<H2>Using non-IP Virtual Hosts</H2>
-
-<P>Using the new virtual hosts is quite easy, and superficially looks
-like the old method. The notable difference between IP-based and
-name-based virtual host configuration is the
-<A HREF="../mod/core.html#namevirtualhost"><CODE>NameVirtualHost</CODE></A>
-directive which specifies an IP address that should be used as a
-target for name-based virtual hosts.</P>
-
-<P>For example, suppose that both <SAMP>www.domain.tld</SAMP> and
-<SAMP>www.otherdomain.tld</SAMP> point at the IP address
-<SAMP>111.22.33.44</SAMP>. Then you simply add to one of the Apache
-configuration files (most likely <CODE>httpd.conf</CODE> or
-<CODE>srm.conf</CODE>) code similar to the following:</P>
-
-
-
-<PRE>
- NameVirtualHost 111.22.33.44
-
- &lt;VirtualHost 111.22.33.44&gt;
- ServerName www.domain.tld
- DocumentRoot /www/domain
- &lt;/VirtualHost&gt;
-
- &lt;VirtualHost 111.22.33.44&gt;
- ServerName www.otherdomain.tld
- DocumentRoot /www/otherdomain
- &lt;/VirtualHost&gt;
-</PRE>
-
-<P>Of course, any additional directives can (and should) be placed
-into the <CODE>&lt;VirtualHost&gt;</CODE> section. To make this work,
-all that is needed is to make sure that the names
-<SAMP>www.domain.tld</SAMP> and <SAMP>www.otherdomain.tld</SAMP>
-are pointing to the IP address <SAMP>111.22.33.44</SAMP></P>
-
-<P>Note: When you specify an IP address in a <CODE>NameVirtualHost</CODE>
-directive then requests to that IP address will only ever be served
-by matching &lt;VirtualHost&gt;s. The "main server" will
-<STRONG>never</STRONG> be served from the specified IP address.
-If you start to use virtual hosts you should stop to use the "main server"
-as an independent server and rather use it as a place for
-configuration directives that are common for all your virtual hosts.
-In other words, you should add a &lt;VirtualHost&gt; section for
-<EM>every</EM> server (hostname) you want to maintain on your server.
-
-<P>Additionally, many servers may wish to be accessible by more than
-one name. For example, the example server might want to be accessible
-as <CODE>domain.tld</CODE>, or <CODE>www2.domain.tld</CODE>, assuming
-the IP addresses pointed to the same server. In fact, one might want it
-so that all addresses at <CODE>domain.tld</CODE> were picked up by the
-server. This is possible with the
-<A HREF="../mod/core.html#serveralias"><CODE>ServerAlias</CODE></A>
-directive, placed inside the &lt;VirtualHost&gt; section. For
-example:</P>
-
-<PRE>
- ServerAlias domain.tld *.domain.tld
-</PRE>
-
-<P>Note that you can use <CODE>*</CODE> and <CODE>?</CODE> as wild-card
-characters.</P>
-
-<P>You also might need <CODE>ServerAlias</CODE> if you are
-serving local users who do not always include the domain name.
-For example, if local users are
-familiar with typing "www" or "www.foobar" then you will need to add
-<CODE>ServerAlias www www.foobar</CODE>. It isn't possible for the
-server to know what domain the client uses for their name resolution
-because the client doesn't provide that information in the request.
-The <CODE>ServerAlias</CODE> directive is generally a way to have different
-hostnames pointing to the same virtual host.
-</P>
-
-<H2>Compatibility with Older Browsers</H2>
-
-<P>As mentioned earlier, there are still some clients in use who
-do not send the required data for the name-based virtual hosts to work
-properly. These clients will always be sent the pages from the
-first virtual host listed for that IP address (the
-<CITE>primary</CITE> name-based virtual host).</P>
-
-<P>There is a possible workaround with the
-<A HREF="../mod/core.html#serverpath"><CODE>ServerPath</CODE></A>
-directive, albeit a slightly cumbersome one:</P>
-
-<P>Example configuration:
-
-<PRE>
- NameVirtualHost 111.22.33.44
-
- &lt;VirtualHost 111.22.33.44&gt;
- ServerName www.domain.tld
- ServerPath /domain
- DocumentRoot /web/domain
- &lt;/VirtualHost&gt;
-</PRE>
-
-<P>What does this mean? It means that a request for any URI beginning
-with "<SAMP>/domain</SAMP>" will be served from the virtual host
-<SAMP>www.domain.tld</SAMP> This means that the pages can be accessed as
-<CODE>http://www.domain.tld/domain/</CODE> for all clients, although
-clients sending a <SAMP>Host:</SAMP> header can also access it as
-<CODE>http://www.domain.tld/</CODE>.</P>
-
-<P>In order to make this work, put a link on your primary virtual host's page
-to <SAMP>http://www.domain.tld/domain/</SAMP>
-Then, in the virtual host's pages, be sure to use either purely
-relative links (<EM>e.g.</EM>, "<SAMP>file.html</SAMP>" or
-"<SAMP>../icons/image.gif</SAMP>" or links containing the prefacing
-<SAMP>/domain/</SAMP>
-(<EM>e.g.</EM>, "<SAMP>http://www.domain.tld/domain/misc/file.html</SAMP>" or
-"<SAMP>/domain/misc/file.html</SAMP>").</P>
-
-<P>This requires a bit of
-discipline, but adherence to these guidelines will, for the most part,
-ensure that your pages will work with all browsers, new and old.</P>
-
-<P>See also: <A HREF="examples.html#serverpath">ServerPath configuration
-example</A></P>
-
-<!--#include virtual="footer.html" -->
-</BODY>
-</HTML>
diff --git a/httpd.dsp b/httpd.dsp
deleted file mode 100644
index b6970441b8..0000000000
--- a/httpd.dsp
+++ /dev/null
@@ -1,415 +0,0 @@
-# Microsoft Developer Studio Project File - Name="ApacheCore" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 5.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-CFG=ApacheCore - Win32 Release
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "ApacheCore.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "ApacheCore.mak" CFG="ApacheCore - Win32 Release"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "ApacheCore - Win32 Release" (based on\
- "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "ApacheCore - Win32 Debug" (based on\
- "Win32 (x86) Dynamic-Link Library")
-!MESSAGE
-
-# Begin Project
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "ApacheCore - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir ".\ApacheCo"
-# PROP BASE Intermediate_Dir ".\ApacheCo"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ".\CoreR"
-# PROP Intermediate_Dir ".\CoreR"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I ".\include" /I ".\lib\apr\include" /I ".\os\win32" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "WIN32_LEAN_AND_MEAN" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE MTL /nologo /D "NDEBUG" /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x809 /d "NDEBUG"
-# ADD RSC /l 0x809 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
-# ADD LINK32 lib\apr\Release\aprlib.lib regex\release\regex.lib ap\Release\ap.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /machine:I386
-
-!ELSEIF "$(CFG)" == "ApacheCore - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir ".\ApacheC0"
-# PROP BASE Intermediate_Dir ".\ApacheC0"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ".\CoreD"
-# PROP Intermediate_Dir ".\CoreD"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I ".\include" /I ".\lib\apr\include" /I ".\os\win32" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "WIN32_LEAN_AND_MEAN" /FR /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE MTL /nologo /D "_DEBUG" /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x809 /d "_DEBUG"
-# ADD RSC /l 0x809 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386
-# ADD LINK32 lib\apr\debug\aprlib.lib regex\debug\regex.lib ap\Debug\ap.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /debug /machine:I386
-# SUBTRACT LINK32 /map
-
-!ENDIF
-
-# Begin Target
-
-# Name "ApacheCore - Win32 Release"
-# Name "ApacheCore - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
-# Begin Source File
-
-SOURCE=.\ApacheCore.def
-# End Source File
-# Begin Source File
-
-SOURCE=.\main\buff.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\buildmark.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\main\http_config.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\main\http_connection.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\main\http_core.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\main\http_log.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\main\http_main.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\main\http_protocol.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\main\http_request.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\main\http_vhost.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\main\iol_file.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\os\win32\iol_socket.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\main\listen.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\modules\standard\mod_access.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\modules\standard\mod_actions.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\modules\standard\mod_alias.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\modules\standard\mod_asis.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\modules\standard\mod_auth.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\modules\standard\mod_autoindex.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\modules\standard\mod_cgi.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\modules\standard\mod_dir.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\modules\standard\mod_env.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\modules\standard\mod_imap.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\modules\standard\mod_include.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\modules\standard\mod_log_config.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\modules\standard\mod_mime.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\modules\standard\mod_negotiation.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\modules\standard\mod_setenvif.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\modules\standard\mod_so.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\modules\standard\mod_userdir.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\os\win32\modules.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\os\win32\registry.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\main\rfc1413.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\os\win32\service.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\main\util.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\main\util_date.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\main\util_md5.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\main\util_script.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\main\util_uri.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\os\win32\util_win32.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\modules\mpm\winnt\winnt.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
-# Begin Source File
-
-SOURCE=.\include\ap.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\ap_hooks.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\ap_iol.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\ap_listen.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\ap_md5.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\buff.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\conf.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\explain.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\fnmatch.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\hsregex.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\http_conf_globals.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\http_config.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\http_connection.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\http_core.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\http_log.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\http_main.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\http_protocol.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\http_request.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\http_vhost.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\httpd.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\os\win32\iol_socket.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\modules\standard\mod_mime.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\modules\mpm\winnt\mpm_default.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\os\win32\os.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\os\win32\registry.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\rfc1413.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\os\win32\service.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\util_date.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\util_md5.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\util_script.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\util_uri.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\modules\mpm\winnt\winnt.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
-# End Group
-# Begin Group "Generated Files"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\main\test_char.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\main\uri_delims.h
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/libhttpd.def b/libhttpd.def
deleted file mode 100644
index 1a898f8082..0000000000
--- a/libhttpd.def
+++ /dev/null
@@ -1,396 +0,0 @@
-; apachecore.def :
-
-LIBRARY ApacheCore
-DESCRIPTION ''
-
-EXPORTS
- ; Add new API calls to the end of this list.
-; ap_MD5Final @1
-; ap_MD5Init @2
-; ap_MD5Update @3
-; ap_acquire_mutex @4
- ap_add_cgi_vars @5
- ap_add_common_vars @6
- ap_add_loaded_module @7
- ap_add_module @8
- ap_add_named_module @9
- ap_add_per_dir_conf @10
- ap_add_per_url_conf @11
- ;ap_add_version_component @12
- ap_allow_options @13
- ap_allow_overrides @14
-; ap_append_arrays @15
-; ap_array_cat @16
- ap_auth_name @17
- ap_auth_type @18
- ap_basic_http_header @19
- ap_bclose @20
- ap_bcreate @21
- ap_bfilbuf @22
- ;ap_bfileno @23
- ap_bflsbuf @24
- ap_bflush @25
- ap_bgetopt @26
- ap_bgets @27
- ;ap_bhalfduplex @28
- ;ap_block_alarms @29
- ap_blookc @30
- ;ap_bnonblock @31
- ap_bonerror @32
- ;ap_bpushfd @33
- ;ap_bpushh @34
- ap_bputs @35
- ap_bread @36
- ap_bsetflag @37
- ap_bsetopt @38
- ;ap_bskiplf @39
-; ap_bspawn_child @40
- ap_bwrite @41
- ;ap_bytes_in_free_blocks @42
- ;ap_bytes_in_pool @43
-; ap_call_exec @44
- ;ap_can_exec @45
- ap_cfg_closefile @46
- ap_cfg_getc @47
- ap_cfg_getline @48
- ap_chdir_file @49
- ;ap_check_alarm @50
- ap_check_cmd_context @51
- ap_checkmask @52
-; ap_cleanup_for_exec @53
- ap_clear_module_list @54
-; ap_clear_pool @55
-; ap_clear_table @56
- ap_close_piped_log @57
- ap_construct_server @58
- ap_construct_url @59
- ap_content_type_tolower @60
-; ap_copy_array @61
-; ap_copy_array_hdr @62
-; ap_copy_table @63
- ap_count_dirs @64
-; ap_cpystrn @65
- ap_create_environment @66
-; ap_create_mutex @67
- ap_create_per_dir_config @68
- ap_custom_response @69
- ap_default_port_for_request @70
- ap_default_port_for_scheme @71
- ap_default_type @72
-; ap_destroy_mutex @73
-; ap_destroy_pool @74
- ap_destroy_sub_req @75
- ap_die @76
- ap_discard_request_body @77
- ap_document_root @78
- ap_each_byterange @79
- ap_error_log2stderr @80
- ap_escape_html @81
- ap_escape_path_segment @82
- ap_escape_quotes @83
- ap_escape_shell_cmd @84
- ;ap_exists_scoreboard_image @85
- ap_finalize_request_protocol @86
- ap_find_command @87
- ap_find_command_in_modules @88
- ap_find_last_token @89
- ap_find_linked_module @90
- ap_find_module_name @91
- ap_find_path_info @92
- ap_find_token @93
- ap_get_basic_auth_pw @94
- ap_get_client_block @95
-; ap_get_gmtoff @96
- ap_get_limit_req_body @97
- ap_get_remote_host @98
- ap_get_remote_logname @99
- ap_get_server_built @100
- ap_get_server_name @101
- ap_get_server_port @102
- ;ap_get_server_version @103
-; ap_get_time @104
- ap_get_token @105
- ap_getparents @106
- ap_getword @107
- ap_getword_conf @108
- ap_getword_conf_nc @109
- ap_getword_nc @110
- ap_getword_nulls @111
- ap_getword_nulls_nc @112
- ap_getword_white @113
- ap_getword_white_nc @114
-; ap_gm_timestr_822 @115
- ap_gname2id @116
- ap_handle_command @117
- ;ap_hard_timeout @118
- ap_ht_time @119
- ap_ind @120
- ap_index_of_response @121
- ap_init_virtual_host @122
- ap_internal_redirect @123
- ap_internal_redirect_handler @124
- ap_is_directory @125
-; ap_is_fnmatch @126
- ap_is_initial_req @127
- ap_is_matchexp @128
- ap_is_url @129
-; ap_kill_cleanup @130
-; ap_kill_cleanups_for_fd @131
-; ap_kill_cleanups_for_socket @132
- ;ap_kill_timeout @133
- ap_log_assert @134
- ap_log_error_old @135
- ap_log_reason @136
- ap_log_unixerr @137
-; ap_make_array @138
- ap_make_dirstr @139
- ap_make_dirstr_parent @140
- ap_make_dirstr_prefix @141
- ap_make_full_path @142
-; ap_make_sub_pool @143
-; ap_make_table @144
- ap_matches_request_vhost @145
- ap_md5 @146
- ap_md5_binary @147
- ap_md5contextTo64 @148
- ap_md5digest @149
- ap_meets_conditions @150
- ap_no2slash @151
- ap_note_auth_failure @152
- ap_note_basic_auth_failure @153
-; ap_note_cleanups_for_fd @154
-; ap_note_cleanups_for_file @155
-; ap_note_cleanups_for_h @156
-; ap_note_cleanups_for_socket @157
- ap_note_digest_auth_failure @158
-; ap_note_subprocess @159
-; ap_open_mutex @160
- ap_open_piped_log @161
- ap_os_canonical_filename @162
- ap_os_escape_path @163
-; ap_overlap_tables @164
-; ap_overlay_tables @165
-; ap_palloc @166
- ap_parseHTTPdate @167
- ap_parse_hostinfo_components @168
- ap_parse_uri @169
- ap_parse_uri_components @170
-; ap_pcalloc @171
- ap_pcfg_open_custom @172
- ap_pcfg_openfile @173
-; ap_pclosedir @174
-; ap_pclosef @175
-; ap_pcloseh @176
-; ap_pclosesocket @177
- ap_pduphostent @178
-; ap_pfclose @179
-; ap_pfdopen @180
-; ap_pfopen @181
- ap_pgethostbyname @182
-; ap_popendir @183
-; ap_popenf @184
- ap_pregcomp @185
- ap_pregfree @186
- ap_pregsub @187
- ap_psignature @188
-; ap_psocket @189
-; ap_pstrdup @190
-; ap_pstrndup @191
-; ap_push_array @192
-; ap_pvsprintf @193
- ap_rationalize_mtime @194
-; ap_register_cleanup @195
-; ap_release_mutex @196
- ap_remove_loaded_module @197
- ap_remove_module @198
- ap_requires @199
- ;ap_reset_timeout @200
- ap_rflush @201
- ap_rind @202
- ap_rputc @203
- ap_rputs @204
-; ap_run_cleanup @205
- ap_run_sub_req @206
- ap_rwrite @207
- ap_satisfies @208
- ap_scan_script_header_err @209
- ap_scan_script_header_err_buff @210
- ap_scan_script_header_err_core @211
- ;ap_send_fb @212
- ;ap_send_fb_length @213
- ap_send_fd @214
- ap_send_fd_length @215
- ap_send_http_header @216
- ap_send_http_trace @217
-; ap_send_mmap @218
- ap_send_size @219
- ap_server_root_relative @220
- ap_set_byterange @221
- ap_set_content_length @222
- ap_set_etag @223
- ap_set_keepalive @224
- ap_set_last_modified @225
- ap_setup_client_block @226
- ap_should_client_block @227
- ;ap_soft_timeout @228
- ap_some_auth_required @229
-; ap_spawn_child @230
- ap_srm_command_loop @231
- ap_str_tolower @232
- ap_strcasecmp_match @233
- ap_strcmp_match @234
- ap_sub_req_lookup_file @235
- ap_sub_req_lookup_uri @236
- ;ap_sync_scoreboard_image @237
-; ap_table_add @238
-; ap_table_addn @239
-; ap_table_get @240
-; ap_table_merge @241
-; ap_table_mergen @242
-; ap_table_set @243
-; ap_table_setn @244
-; ap_table_unset @245
-; ap_tm2sec @246
- ap_uname2id @247
- ;ap_unblock_alarms @248
- ap_unescape_url @249
- ap_unparse_uri_components @250
- ap_update_mtime @251
- ap_uudecode @252
- ap_uuencode @253
- ap_vbprintf @254
-; ap_vformatter @255
-; ap_vsnprintf @256
- closedir @257
- opendir @258
-; os_spawnv @259
-; os_spawnve @260
- os_stat @261
- readdir @262
- regcomp @263
- regexec @264
- regfree @265
- access_module @266
- alias_module @267
- ap_bprintf @268
- ap_bvputs @269
-; ap_day_snames @270
- ;ap_extended_status @271
- ap_limit_section @272
- ap_loaded_modules @273
- ap_log_error @274
- ap_log_printf @275
- ap_log_rerror @276
-; ap_month_snames @277
-; ap_null_cleanup @278
-; ap_psprintf @279
-; ap_pstrcat @280
- ;ap_restart_time @281
- ap_rprintf @282
- ap_rvputs @283
- ;ap_scoreboard_image @284
- ap_send_header_field @285
- ap_server_argv0 @286
- ap_server_root @287
- ap_set_file_slot @288
- ap_set_flag_slot @289
- ap_set_string_slot @290
- ap_set_string_slot_lower @291
-; ap_snprintf @292
- ;ap_suexec_enabled @293
-; ap_table_do @294
- apache_main @295
- asis_module @296
- auth_module @297
- autoindex_module @298
- ;cgi_module @299
- config_log_module @300
- core_module @301
- dir_module @302
- env_module @303
- imap_module @304
- ;includes_module @305
- mime_module @306
- negotiation_module @307
-; os_spawnle @308
- setenvif_module @309
- ;so_module @310
- top_module @311
-; ap_fnmatch @312
- ap_method_number_of @313
- ap_exists_config_define @314
- ap_single_module_configure @315
- ap_make_etag @317
-; ap_array_pstrcat @318
- ap_os_is_filename_valid @319
- ap_find_list_item @320
-; ap_MD5Encode @321
-; ap_validate_password @322
- ap_size_list_item @323
- ap_get_list_item @324
- ;ap_scoreboard_fname @325
- ;ap_pid_fname @326
- ;ap_excess_requests_per_child @327
- ;ap_threads_per_child @328
- ;ap_max_requests_per_child @329
- ;ap_daemons_to_start @330
- ;ap_daemons_min_free @331
- ;ap_daemons_max_free @332
- ;ap_daemons_limit @333
- ;ap_user_name @334
- ;ap_user_id @335
- ;ap_group_id @336
- ;ap_standalone @337
- ;ap_server_confname @338
- ap_sub_req_method_uri @339
- ap_regerror @341
- ap_regexec @342
- ap_field_noparam @343
- ap_pbase64decode @344
- ap_pbase64encode @345
- ap_base64encode @346
- ap_base64encode_binary @347
- ap_base64encode_len @348
- ap_base64decode @349
- ap_base64decode_binary @350
- ap_base64decode_len @351
- ap_SHA1Init @352
- ap_SHA1Update_binary @353
- ap_SHA1Update @354
- ap_SHA1Final @355
- ap_sha1_base64 @356
- ap_show_hook @357
- ap_hook_sort_register @358
- ap_hook_process_connection @359
- ap_process_http_connection @360
- ap_hook_check_user_id @361
- ap_hook_auth_checker @362
- ap_hook_fixups @363
- regerror @364
- ap_send_error_response @365
- ap_start_shutdown @366
- send_signal_to_service @367
- ap_read_config @368
- ap_server_pre_read_config @369
- ap_server_post_read_config @370
- ap_setup_prelinked_modules @371
- RemoveService @372
- InstallService @373
- isValidService @374
- service_main @375
- isProcessService @376
- ap_registry_get_server_root @377
- ap_registry_get_service_conf @378
- ap_hook_pre_connection @379
- ap_hook_post_read_request @380
- ap_hook_log_transaction @381
- ap_hook_http_method @382
- ap_hook_default_port @383
- ap_hook_translate_name @384
- ap_hook_type_checker @385
- ap_hook_access_checker @386
- ap_hook_header_parser @387
-; ap_hook_pre_config @388
- ap_hook_post_config @389
- ap_hook_open_logs @390
- ap_hook_child_init @391
diff --git a/modules/aaa/mod_auth_anon.dsp b/modules/aaa/mod_auth_anon.dsp
deleted file mode 100644
index 3f4056b399..0000000000
--- a/modules/aaa/mod_auth_anon.dsp
+++ /dev/null
@@ -1,115 +0,0 @@
-# Microsoft Developer Studio Project File - Name="ApacheModuleAuthAnon" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 5.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-CFG=ApacheModuleAuthAnon - Win32 Release
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "ApacheModuleAuthAnon.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "ApacheModuleAuthAnon.mak"\
- CFG="ApacheModuleAuthAnon - Win32 Release"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "ApacheModuleAuthAnon - Win32 Release" (based on\
- "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "ApacheModuleAuthAnon - Win32 Debug" (based on\
- "Win32 (x86) Dynamic-Link Library")
-!MESSAGE
-
-# Begin Project
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "ApacheModuleAuthAnon - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir ".\Release"
-# PROP BASE Intermediate_Dir ".\Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ".\ApacheModuleAuthAnonR"
-# PROP Intermediate_Dir ".\ApacheModuleAuthAnonR"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\include" /I ".\\" /I "..\..\lib\apr\include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "SHARED_MODULE" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE MTL /nologo /D "NDEBUG" /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x809 /d "NDEBUG"
-# ADD RSC /l 0x809 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
-# ADD LINK32 ..\..\CoreR\ApacheCore.lib ..\..\lib\apr\Release\aprlib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib /nologo /subsystem:windows /dll /machine:I386
-
-!ELSEIF "$(CFG)" == "ApacheModuleAuthAnon - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir ".\Debug"
-# PROP BASE Intermediate_Dir ".\Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ".\ApacheModuleAuthAnonD"
-# PROP Intermediate_Dir ".\ApacheModuleAuthAnonD"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\include" /I ".\\" /I "..\..\lib\apr\include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "SHARED_MODULE" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE MTL /nologo /D "_DEBUG" /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x809 /d "_DEBUG"
-# ADD RSC /l 0x809 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386
-# ADD LINK32 ..\..\CoreD\ApacheCore.lib ..\..\lib\apr\Debug\aprlib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib /nologo /subsystem:windows /dll /debug /machine:I386
-
-!ENDIF
-
-# Begin Target
-
-# Name "ApacheModuleAuthAnon - Win32 Release"
-# Name "ApacheModuleAuthAnon - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
-# Begin Source File
-
-SOURCE=..\..\modules\standard\mod_auth_anon.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
-# Begin Source File
-
-SOURCE=.\readdir.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/modules/arch/win32/mod_isapi.c b/modules/arch/win32/mod_isapi.c
deleted file mode 100644
index 592b5ec9f6..0000000000
--- a/modules/arch/win32/mod_isapi.c
+++ /dev/null
@@ -1,570 +0,0 @@
-/* ====================================================================
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 2000 The Apache Software Foundation. All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgment:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowledgment may appear in the software itself,
- * if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Apache" and "Apache Software Foundation" must
- * not be used to endorse or promote products derived from this
- * software without prior written permission. For written
- * permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- * nor may "Apache" appear in their name, without prior written
- * permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation. For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
- * Portions of this software are based upon public domain software
- * originally written at the National Center for Supercomputing Applications,
- * University of Illinois, Urbana-Champaign.
- */
-
-/*
- * mod_isapi.c - Internet Server Application (ISA) module for Apache
- * by Alexei Kosut <akosut@apache.org>
- *
- * This module implements Microsoft's ISAPI, allowing Apache (when running
- * under Windows) to load Internet Server Applications (ISAPI extensions).
- * It implements all of the ISAPI 2.0 specification, except for the
- * "Microsoft-only" extensions dealing with asynchronous I/O. All ISAPI
- * extensions that use only synchronous I/O and are compatible with the
- * ISAPI 2.0 specification should work (most ISAPI 1.0 extensions should
- * function as well).
- *
- * To load, simply place the ISA in a location in the document tree.
- * Then add an "AddHandler isapi-isa dll" into your config file.
- * You should now be able to load ISAPI DLLs just be reffering to their
- * URLs. Make sure the ExecCGI option is active in the directory
- * the ISA is in.
- */
-
-#include "httpd.h"
-#include "http_config.h"
-#include "http_core.h"
-#include "http_protocol.h"
-#include "http_request.h"
-#include "http_log.h"
-#include "util_script.h"
-
-/* We use the exact same header file as the original */
-#include <HttpExt.h>
-
-/* Seems IIS does not enforce the requirement for \r\n termination on HSE_REQ_SEND_RESPONSE_HEADER,
- define this to conform */
-#define RELAX_HEADER_RULE
-
-module isapi_module;
-
-/* Our "Connection ID" structure */
-
-typedef struct {
- LPEXTENSION_CONTROL_BLOCK ecb;
- request_rec *r;
- int status;
-} isapi_cid;
-
-/* Declare the ISAPI functions */
-
-BOOL WINAPI GetServerVariable (HCONN hConn, LPSTR lpszVariableName,
- LPVOID lpvBuffer, LPDWORD lpdwSizeofBuffer);
-BOOL WINAPI WriteClient (HCONN ConnID, LPVOID Buffer, LPDWORD lpwdwBytes,
- DWORD dwReserved);
-BOOL WINAPI ReadClient (HCONN ConnID, LPVOID lpvBuffer, LPDWORD lpdwSize);
-BOOL WINAPI ServerSupportFunction (HCONN hConn, DWORD dwHSERequest,
- LPVOID lpvBuffer, LPDWORD lpdwSize,
- LPDWORD lpdwDataType);
-
-/*
- The optimiser blows it totally here. What happens is that autos are addressed relative to the
- stack pointer, which, of course, moves around. The optimiser seems to lose track of it somewhere
- between setting isapi_entry and calling through it. We work around the problem by forcing it to
- use frame pointers.
-*/
-#pragma optimize("y",off)
-
-int isapi_handler (request_rec *r) {
- LPEXTENSION_CONTROL_BLOCK ecb =
- ap_pcalloc(r->pool, sizeof(struct _EXTENSION_CONTROL_BLOCK));
- HSE_VERSION_INFO *pVer = ap_pcalloc(r->pool, sizeof(HSE_VERSION_INFO));
-
- HINSTANCE isapi_handle;
- BOOL (*isapi_version)(HSE_VERSION_INFO *); /* entry point 1 */
- DWORD (*isapi_entry)(LPEXTENSION_CONTROL_BLOCK); /* entry point 2 */
- BOOL (*isapi_term)(DWORD); /* optional entry point 3 */
-
- isapi_cid *cid = ap_pcalloc(r->pool, sizeof(isapi_cid));
- ap_table_t *e = r->subprocess_env;
- int retval;
-
- /* Use similar restrictions as CGIs */
-
- if (!(ap_allow_options(r) & OPT_EXECCGI))
- return FORBIDDEN;
-
- if (r->finfo.st_mode == 0)
- return NOT_FOUND;
-
- if (S_ISDIR(r->finfo.st_mode))
- return FORBIDDEN;
-
- /* Load the module */
-
- if (!(isapi_handle = LoadLibraryEx(r->filename, NULL,
- LOAD_WITH_ALTERED_SEARCH_PATH))) {
- ap_log_rerror(APLOG_MARK, APLOG_ALERT, r,
- "Could not load DLL: %s", r->filename);
- return SERVER_ERROR;
- }
-
- if (!(isapi_version =
- (void *)(GetProcAddress(isapi_handle, "GetExtensionVersion")))) {
- ap_log_rerror(APLOG_MARK, APLOG_ALERT, r,
- "DLL could not load GetExtensionVersion(): %s", r->filename);
- FreeLibrary(isapi_handle);
- return SERVER_ERROR;
- }
-
- if (!(isapi_entry =
- (void *)(GetProcAddress(isapi_handle, "HttpExtensionProc")))) {
- ap_log_rerror(APLOG_MARK, APLOG_ALERT, r,
- "DLL could not load HttpExtensionProc(): %s", r->filename);
- FreeLibrary(isapi_handle);
- return SERVER_ERROR;
- }
-
- isapi_term = (void *)(GetProcAddress(isapi_handle, "TerminateExtension"));
-
- /* Run GetExtensionVersion() */
-
- if (!(*isapi_version)(pVer)) {
- ap_log_rerror(APLOG_MARK, APLOG_ALERT, r,
- "ISAPI GetExtensionVersion() failed: %s", r->filename);
- FreeLibrary(isapi_handle);
- return SERVER_ERROR;
- }
-
- /* Set up variables */
- ap_add_common_vars(r);
- ap_add_cgi_vars(r);
-
- /* Set up connection ID */
- ecb->ConnID = (HCONN)cid;
- cid->ecb = ecb;
- cid->r = r;
- cid->status = 0;
-
- ecb->cbSize = sizeof(struct _EXTENSION_CONTROL_BLOCK);
- ecb->dwVersion = MAKELONG(0, 2);
- ecb->dwHttpStatusCode = 0;
- strcpy(ecb->lpszLogData, "");
- ecb->lpszMethod = r->method;
- ecb->lpszQueryString = ap_table_get(e, "QUERY_STRING");
- ecb->lpszPathInfo = ap_table_get(e, "PATH_INFO");
- ecb->lpszPathTranslated = ap_table_get(e, "PATH_TRANSLATED");
- ecb->lpszContentType = ap_table_get(e, "CONTENT_TYPE");
-
- /* Set up client input */
- if ((retval = ap_setup_client_block(r, REQUEST_CHUNKED_ERROR))) {
- if (isapi_term) (*isapi_term)(HSE_TERM_MUST_UNLOAD);
- FreeLibrary(isapi_handle);
- return retval;
- }
-
- if (ap_should_client_block(r)) {
- /* Unlike IIS, which limits this to 48k, we read the whole
- * sucker in. I suppose this could be bad for memory if someone
- * uploaded the complete works of Shakespeare. Well, WebSite
- * does the same thing.
- */
- long to_read = atol(ap_table_get(e, "CONTENT_LENGTH"));
- long read;
-
- /* Actually, let's cap it at 48k, until we figure out what
- * to do with this... we don't want a Content-Length: 1000000000
- * taking out the machine.
- */
-
- if (to_read > 49152) {
- if (isapi_term) (*isapi_term)(HSE_TERM_MUST_UNLOAD);
- FreeLibrary(isapi_handle);
- return HTTP_REQUEST_ENTITY_TOO_LARGE;
- }
-
- ecb->lpbData = ap_pcalloc(r->pool, 1 + to_read);
-
- if ((read = ap_get_client_block(r, ecb->lpbData, to_read)) < 0) {
- if (isapi_term) (*isapi_term)(HSE_TERM_MUST_UNLOAD);
- FreeLibrary(isapi_handle);
- return SERVER_ERROR;
- }
-
- /* Although its not to spec, IIS seems to null-terminate
- * its lpdData string. So we will too. To make sure
- * cbAvailable matches cbTotalBytes, we'll up the latter
- * and equalize them.
- */
- ecb->cbAvailable = ecb->cbTotalBytes = read + 1;
- ecb->lpbData[read] = '\0';
- }
- else {
- ecb->cbTotalBytes = 0;
- ecb->cbAvailable = 0;
- ecb->lpbData = NULL;
- }
-
- /* Set up the callbacks */
-
- ecb->GetServerVariable = &GetServerVariable;
- ecb->WriteClient = &WriteClient;
- ecb->ReadClient = &ReadClient;
- ecb->ServerSupportFunction = &ServerSupportFunction;
-
- /* All right... try and load the sucker */
- retval = (*isapi_entry)(ecb);
-
- /* Set the status (for logging) */
- if (ecb->dwHttpStatusCode)
- r->status = ecb->dwHttpStatusCode;
-
- /* Check for a log message - and log it */
- if (ecb->lpszLogData && strcmp(ecb->lpszLogData, ""))
- ap_log_rerror(APLOG_MARK, APLOG_ERR, r,
- "%s: %s", ecb->lpszLogData, r->filename);
-
- /* All done with the DLL... get rid of it */
- if (isapi_term) (*isapi_term)(HSE_TERM_MUST_UNLOAD);
- FreeLibrary(isapi_handle);
-
- switch(retval) {
- case HSE_STATUS_SUCCESS:
- case HSE_STATUS_SUCCESS_AND_KEEP_CONN:
- /* Ignore the keepalive stuff; Apache handles it just fine without
- * the ISA's "advice".
- */
-
- if (cid->status) /* We have a special status to return */
- return cid->status;
-
- return OK;
- case HSE_STATUS_PENDING: /* We don't support this */
- ap_log_rerror(APLOG_MARK, APLOG_WARNING, r,
- "ISAPI asynchronous I/O not supported: %s", r->filename);
- case HSE_STATUS_ERROR:
- default:
- return SERVER_ERROR;
- }
-
-}
-#pragma optimize("",on)
-
-BOOL WINAPI GetServerVariable (HCONN hConn, LPSTR lpszVariableName,
- LPVOID lpvBuffer, LPDWORD lpdwSizeofBuffer) {
- request_rec *r = ((isapi_cid *)hConn)->r;
- ap_table_t *e = r->subprocess_env;
- const char *result;
-
- /* Mostly, we just grab it from the environment, but there are
- * a couple of special cases
- */
-
- if (!strcasecmp(lpszVariableName, "UNMAPPED_REMOTE_USER")) {
- /* We don't support NT users, so this is always the same as
- * REMOTE_USER
- */
- result = ap_table_get(e, "REMOTE_USER");
- }
- else if (!strcasecmp(lpszVariableName, "SERVER_PORT_SECURE")) {
- /* Apache doesn't support secure requests inherently, so
- * we have no way of knowing. We'll be conservative, and say
- * all requests are insecure.
- */
- result = "0";
- }
- else if (!strcasecmp(lpszVariableName, "URL")) {
- result = r->uri;
- }
- else {
- result = ap_table_get(e, lpszVariableName);
- }
-
- if (result) {
- if (strlen(result) > *lpdwSizeofBuffer) {
- *lpdwSizeofBuffer = strlen(result);
- SetLastError(ERROR_INSUFFICIENT_BUFFER);
- return FALSE;
- }
- strncpy(lpvBuffer, result, *lpdwSizeofBuffer);
- return TRUE;
- }
-
- /* Didn't find it */
- SetLastError(ERROR_INVALID_INDEX);
- return FALSE;
-}
-
-BOOL WINAPI WriteClient (HCONN ConnID, LPVOID Buffer, LPDWORD lpwdwBytes,
- DWORD dwReserved) {
- request_rec *r = ((isapi_cid *)ConnID)->r;
- int writ; /* written, actually, but why shouldn't I make up words? */
-
- /* We only support synchronous writing */
- if (dwReserved && dwReserved != HSE_IO_SYNC) {
- ap_log_rerror(APLOG_MARK, APLOG_WARNING, r,
- "ISAPI asynchronous I/O not supported: %s", r->filename);
- SetLastError(ERROR_INVALID_PARAMETER);
- return FALSE;
- }
-
- if ((writ = ap_rwrite(Buffer, *lpwdwBytes, r)) == EOF) {
- SetLastError(ERROR); /* XXX: Find the right error code */
- return FALSE;
- }
-
- *lpwdwBytes = writ;
- return TRUE;
-}
-
-BOOL WINAPI ReadClient (HCONN ConnID, LPVOID lpvBuffer, LPDWORD lpdwSize) {
- /* Doesn't need to do anything; we've read all the data already */
- return TRUE;
-}
-
-/* XXX: There is an O(n^2) attack possible here. */
-BOOL WINAPI ServerSupportFunction (HCONN hConn, DWORD dwHSERequest,
- LPVOID lpvBuffer, LPDWORD lpdwSize,
- LPDWORD lpdwDataType) {
- isapi_cid *cid = (isapi_cid *)hConn;
- request_rec *subreq, *r = cid->r;
- char *data;
-
- switch (dwHSERequest) {
- case HSE_REQ_SEND_URL_REDIRECT_RESP:
- /* Set the status to be returned when the HttpExtensionProc()
- * is done.
- */
- ap_table_set (r->headers_out, "Location", lpvBuffer);
- cid->status = cid->r->status = cid->ecb->dwHttpStatusCode = REDIRECT;
- return TRUE;
-
- case HSE_REQ_SEND_URL:
- /* Read any additional input */
-
- if (r->remaining > 0) {
- char argsbuffer[HUGE_STRING_LEN];
-
- while (ap_get_client_block(r, argsbuffer, HUGE_STRING_LEN));
- }
-
- /* Reset the method to GET */
- r->method = ap_pstrdup(r->pool, "GET");
- r->method_number = M_GET;
-
- /* Don't let anyone think there's still data */
- ap_table_unset(r->headers_in, "Content-Length");
-
- ap_internal_redirect((char *)lpvBuffer, r);
- return TRUE;
-
- case HSE_REQ_SEND_RESPONSE_HEADER:
- r->status_line = lpvBuffer ? lpvBuffer : ap_pstrdup(r->pool, "200 OK");
- sscanf(r->status_line, "%d", &r->status);
- cid->ecb->dwHttpStatusCode = r->status;
-
- /* Now fill in the HTTP headers, and the rest of it. Ick.
- * lpdwDataType contains a string that has headers (in MIME
- * format), a blank like, then (possibly) data. We need
- * to parse it.
- *
- * Easy case first:
- */
- if (!lpdwDataType) {
- ap_send_http_header(r);
- return TRUE;
- }
-
- /* Make a copy - don't disturb the original */
- data = ap_pstrdup(r->pool, (char *)lpdwDataType);
-
- /* We *should* break before this while loop ends */
- while (*data) {
- char *value, *lf = strchr(data, '\n');
- int p;
-
-#ifdef RELAX_HEADER_RULE
- if (lf)
- *lf = '\0';
-#else
- if (!lf) { /* Huh? Invalid data, I think */
- ap_log_rerror(APLOG_MARK, APLOG_ERR, r,
- "ISA sent invalid headers: %s", r->filename);
- SetLastError(ERROR); /* XXX: Find right error */
- return FALSE;
- }
-
- /* Get rid of \n and \r */
- *lf = '\0';
-#endif
- p = strlen(data);
- if (p > 0 && data[p-1] == '\r') data[p-1] = '\0';
-
- /* End of headers */
- if (*data == '\0') {
-#ifdef RELAX_HEADER_RULE
- if (lf)
-#endif
- data = lf + 1; /* Reset data */
- break;
- }
-
- if (!(value = strchr(data, ':'))) {
- SetLastError(ERROR); /* XXX: Find right error */
- ap_log_rerror(APLOG_MARK, APLOG_ERR, r,
- "ISA sent invalid headers", r->filename);
- return FALSE;
- }
-
- *value++ = '\0';
- while (*value && ap_isspace(*value)) ++value;
-
- /* Check all the special-case headers. Similar to what
- * ap_scan_script_header_err() does (see that function for
- * more detail)
- */
-
- if (!strcasecmp(data, "Content-Type")) {
- char *tmp;
- /* Nuke trailing whitespace */
-
- char *endp = value + strlen(value) - 1;
- while (endp > value && ap_isspace(*endp)) *endp-- = '\0';
-
- tmp = ap_pstrdup (r->pool, value);
- ap_str_tolower(tmp);
- r->content_type = tmp;
- }
- else if (!strcasecmp(data, "Content-Length")) {
- ap_table_set(r->headers_out, data, value);
- }
- else if (!strcasecmp(data, "Transfer-Encoding")) {
- ap_table_set(r->headers_out, data, value);
- }
- else if (!strcasecmp(data, "Set-Cookie")) {
- ap_table_add(r->err_headers_out, data, value);
- }
- else {
- ap_table_merge(r->err_headers_out, data, value);
- }
-
- /* Reset data */
-#ifdef RELAX_HEADER_RULE
- if (!lf) {
- data += p;
- break;
- }
-#endif
- data = lf + 1;
- }
-
- /* All the headers should be set now */
-
- ap_send_http_header(r);
-
- /* Any data left should now be sent directly */
- ap_rputs(data, r);
-
- return TRUE;
-
- case HSE_REQ_MAP_URL_TO_PATH:
- /* Map a URL to a filename */
- subreq = ap_sub_req_lookup_uri(ap_pstrndup(r->pool, (char *)lpvBuffer,
- *lpdwSize), r);
-
- GetFullPathName(subreq->filename, *lpdwSize - 1, (char *)lpvBuffer, NULL);
-
- /* IIS puts a trailing slash on directories, Apache doesn't */
-
- if (S_ISDIR (subreq->finfo.st_mode)) {
- int l = strlen((char *)lpvBuffer);
-
- ((char *)lpvBuffer)[l] = '\\';
- ((char *)lpvBuffer)[l + 1] = '\0';
- }
-
- return TRUE;
-
- case HSE_REQ_DONE_WITH_SESSION:
- /* Do nothing... since we don't support async I/O, they'll
- * return from HttpExtensionProc soon
- */
- return TRUE;
-
- /* We don't support all this async I/O, Microsoft-specific stuff */
- case HSE_REQ_IO_COMPLETION:
- case HSE_REQ_TRANSMIT_FILE:
- ap_log_rerror(APLOG_MARK, APLOG_WARNING, r,
- "ISAPI asynchronous I/O not supported: %s", r->filename);
- default:
- SetLastError(ERROR_INVALID_PARAMETER);
- return FALSE;
- }
-}
-
-handler_rec isapi_handlers[] = {
-{ "isapi-isa", isapi_handler },
-{ NULL}
-};
-
-module isapi_module = {
- STANDARD_MODULE_STUFF,
- NULL, /* initializer */
- NULL, /* create per-dir config */
- NULL, /* merge per-dir config */
- NULL, /* server config */
- NULL, /* merge server config */
- NULL, /* command ap_table_t */
- isapi_handlers, /* handlers */
- NULL, /* filename translation */
- NULL, /* check_user_id */
- NULL, /* check auth */
- NULL, /* check access */
- NULL, /* type_checker */
- NULL, /* logger */
- NULL /* header parser */
-};
diff --git a/modules/generators/mod_info.dsp b/modules/generators/mod_info.dsp
deleted file mode 100644
index 53126a03a5..0000000000
--- a/modules/generators/mod_info.dsp
+++ /dev/null
@@ -1,114 +0,0 @@
-# Microsoft Developer Studio Project File - Name="ApacheModuleInfo" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 5.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-CFG=ApacheModuleInfo - Win32 Release
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "ApacheModuleInfo.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "ApacheModuleInfo.mak" CFG="ApacheModuleInfo - Win32 Release"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "ApacheModuleInfo - Win32 Release" (based on\
- "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "ApacheModuleInfo - Win32 Debug" (based on\
- "Win32 (x86) Dynamic-Link Library")
-!MESSAGE
-
-# Begin Project
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "ApacheModuleInfo - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir ".\Release"
-# PROP BASE Intermediate_Dir ".\Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ".\ApacheModuleInfoR"
-# PROP Intermediate_Dir ".\ApacheModuleInfoR"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\include" /I ".\\" /I "..\..\lib\apr\include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "SHARED_MODULE" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE MTL /nologo /D "NDEBUG" /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x809 /d "NDEBUG"
-# ADD RSC /l 0x809 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
-# ADD LINK32 ..\..\CoreR\ApacheCore.lib ..\..\lib\apr\Release\aprlib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib /nologo /subsystem:windows /dll /machine:I386
-
-!ELSEIF "$(CFG)" == "ApacheModuleInfo - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir ".\Debug"
-# PROP BASE Intermediate_Dir ".\Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ".\ApacheModuleInfoD"
-# PROP Intermediate_Dir ".\ApacheModuleInfoD"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\include" /I ".\\" /I "..\..\lib\apr\include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "SHARED_MODULE" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE MTL /nologo /D "_DEBUG" /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x809 /d "_DEBUG"
-# ADD RSC /l 0x809 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386
-# ADD LINK32 ..\..\CoreD\ApacheCore.lib ..\..\lib\apr\Debug\aprlib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib /nologo /subsystem:windows /dll /debug /machine:I386
-
-!ENDIF
-
-# Begin Target
-
-# Name "ApacheModuleInfo - Win32 Release"
-# Name "ApacheModuleInfo - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
-# Begin Source File
-
-SOURCE=..\..\modules\standard\mod_info.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
-# Begin Source File
-
-SOURCE=.\readdir.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/modules/generators/mod_status.dsp b/modules/generators/mod_status.dsp
deleted file mode 100644
index 46f4867f4f..0000000000
--- a/modules/generators/mod_status.dsp
+++ /dev/null
@@ -1,115 +0,0 @@
-# Microsoft Developer Studio Project File - Name="ApacheModuleStatus" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 5.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-CFG=ApacheModuleStatus - Win32 Release
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "ApacheModuleStatus.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "ApacheModuleStatus.mak"\
- CFG="ApacheModuleStatus - Win32 Release"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "ApacheModuleStatus - Win32 Release" (based on\
- "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "ApacheModuleStatus - Win32 Debug" (based on\
- "Win32 (x86) Dynamic-Link Library")
-!MESSAGE
-
-# Begin Project
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "ApacheModuleStatus - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir ".\Release"
-# PROP BASE Intermediate_Dir ".\Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ".\ApacheModuleStatusR"
-# PROP Intermediate_Dir ".\ApacheModuleStatusR"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\include" /I ".\\" /I "..\..\lib\apr\include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "SHARED_MODULE" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE MTL /nologo /D "NDEBUG" /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x809 /d "NDEBUG"
-# ADD RSC /l 0x809 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
-# ADD LINK32 ..\..\CoreR\ApacheCore.lib ..\..\lib\apr\Release\aprlib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib /nologo /subsystem:windows /dll /machine:I386
-
-!ELSEIF "$(CFG)" == "ApacheModuleStatus - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir ".\Debug"
-# PROP BASE Intermediate_Dir ".\Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ".\ApacheModuleStatusD"
-# PROP Intermediate_Dir ".\ApacheModuleStatusD"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\include" /I ".\\" /I "..\..\lib\apr\include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "SHARED_MODULE" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE MTL /nologo /D "_DEBUG" /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x809 /d "_DEBUG"
-# ADD RSC /l 0x809 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386
-# ADD LINK32 ..\..\CoreD\ApacheCore.lib ..\..\lib\apr\Debug\aprlib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib /nologo /subsystem:windows /dll /debug /machine:I386
-
-!ENDIF
-
-# Begin Target
-
-# Name "ApacheModuleStatus - Win32 Release"
-# Name "ApacheModuleStatus - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
-# Begin Source File
-
-SOURCE=..\..\modules\standard\mod_status.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
-# Begin Source File
-
-SOURCE=.\readdir.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/modules/mappers/mod_rewrite.dsp b/modules/mappers/mod_rewrite.dsp
deleted file mode 100644
index 93d9e292be..0000000000
--- a/modules/mappers/mod_rewrite.dsp
+++ /dev/null
@@ -1,119 +0,0 @@
-# Microsoft Developer Studio Project File - Name="ApacheModuleRewrite" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 5.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-CFG=ApacheModuleRewrite - Win32 Release
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "ApacheModuleRewrite.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "ApacheModuleRewrite.mak"\
- CFG="ApacheModuleRewrite - Win32 Release"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "ApacheModuleRewrite - Win32 Release" (based on\
- "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "ApacheModuleRewrite - Win32 Debug" (based on\
- "Win32 (x86) Dynamic-Link Library")
-!MESSAGE
-
-# Begin Project
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "ApacheModuleRewrite - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir ".\Release"
-# PROP BASE Intermediate_Dir ".\Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ".\ApacheModuleRewriteR"
-# PROP Intermediate_Dir ".\ApacheModuleRewriteR"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\include" /I ".\\" /I "..\..\lib\apr\include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "NO_DBM_REWRITEMAP" /D "SHARED_MODULE" /D "WIN32_LEAN_AND_MEAN" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE MTL /nologo /D "NDEBUG" /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x809 /d "NDEBUG"
-# ADD RSC /l 0x809 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
-# ADD LINK32 ..\..\CoreR\ApacheCore.lib ..\..\lib\apr\Release\aprlib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ws2_32.lib /nologo /subsystem:windows /dll /machine:I386
-
-!ELSEIF "$(CFG)" == "ApacheModuleRewrite - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir ".\Debug"
-# PROP BASE Intermediate_Dir ".\Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ".\ApacheModuleRewriteD"
-# PROP Intermediate_Dir ".\ApacheModuleRewriteD"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\include" /I ".\\" /I "..\..\lib\apr\include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "NO_DBM_REWRITEMAP" /D "SHARED_MODULE" /D "WIN32_LEAN_AND_MEAN" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE MTL /nologo /D "_DEBUG" /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x809 /d "_DEBUG"
-# ADD RSC /l 0x809 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386
-# ADD LINK32 ..\..\CoreD\ApacheCore.lib ..\..\lib\apr\Debug\aprlib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ws2_32.lib /nologo /subsystem:windows /dll /debug /machine:I386
-
-!ENDIF
-
-# Begin Target
-
-# Name "ApacheModuleRewrite - Win32 Release"
-# Name "ApacheModuleRewrite - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
-# Begin Source File
-
-SOURCE=..\..\modules\standard\mod_rewrite.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\passwd.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
-# Begin Source File
-
-SOURCE=.\readdir.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/modules/mappers/mod_speling.dsp b/modules/mappers/mod_speling.dsp
deleted file mode 100644
index 9e1205b11a..0000000000
--- a/modules/mappers/mod_speling.dsp
+++ /dev/null
@@ -1,115 +0,0 @@
-# Microsoft Developer Studio Project File - Name="ApacheModuleSpeling" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 5.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-CFG=ApacheModuleSpeling - Win32 Release
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "ApacheModuleSpeling.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "ApacheModuleSpeling.mak"\
- CFG="ApacheModuleSpeling - Win32 Release"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "ApacheModuleSpeling - Win32 Release" (based on\
- "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "ApacheModuleSpeling - Win32 Debug" (based on\
- "Win32 (x86) Dynamic-Link Library")
-!MESSAGE
-
-# Begin Project
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "ApacheModuleSpeling - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir ".\Release"
-# PROP BASE Intermediate_Dir ".\Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ".\ApacheModuleSpelingR"
-# PROP Intermediate_Dir ".\ApacheModuleSpelingR"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\include" /I ".\\" /I "..\..\lib\apr\include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "SHARED_MODULE" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE MTL /nologo /D "NDEBUG" /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x809 /d "NDEBUG"
-# ADD RSC /l 0x809 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
-# ADD LINK32 ..\..\CoreR\ApacheCore.lib ..\..\lib\apr\Release\aprlib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib /nologo /subsystem:windows /dll /machine:I386
-
-!ELSEIF "$(CFG)" == "ApacheModuleSpeling - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir ".\Debug"
-# PROP BASE Intermediate_Dir ".\Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ".\ApacheModuleSpelingD"
-# PROP Intermediate_Dir ".\ApacheModuleSpelingD"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\include" /I ".\\" /I "..\..\lib\apr\include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "SHARED_MODULE" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE MTL /nologo /D "_DEBUG" /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x809 /d "_DEBUG"
-# ADD RSC /l 0x809 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386
-# ADD LINK32 ..\..\CoreD\ApacheCore.lib ..\..\lib\apr\Debug\aprlib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib /nologo /subsystem:windows /dll /debug /machine:I386
-
-!ENDIF
-
-# Begin Target
-
-# Name "ApacheModuleSpeling - Win32 Release"
-# Name "ApacheModuleSpeling - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
-# Begin Source File
-
-SOURCE=..\..\modules\standard\mod_speling.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
-# Begin Source File
-
-SOURCE=.\readdir.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/modules/metadata/mod_cern_meta.dsp b/modules/metadata/mod_cern_meta.dsp
deleted file mode 100644
index 1769910464..0000000000
--- a/modules/metadata/mod_cern_meta.dsp
+++ /dev/null
@@ -1,115 +0,0 @@
-# Microsoft Developer Studio Project File - Name="ApacheModuleCERNMeta" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 5.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-CFG=ApacheModuleCERNMeta - Win32 Release
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "ApacheModuleCERNMeta.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "ApacheModuleCERNMeta.mak"\
- CFG="ApacheModuleCERNMeta - Win32 Release"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "ApacheModuleCERNMeta - Win32 Release" (based on\
- "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "ApacheModuleCERNMeta - Win32 Debug" (based on\
- "Win32 (x86) Dynamic-Link Library")
-!MESSAGE
-
-# Begin Project
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "ApacheModuleCERNMeta - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir ".\Release"
-# PROP BASE Intermediate_Dir ".\Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ".\ApacheModuleCERNMetaR"
-# PROP Intermediate_Dir ".\ApacheModuleCERNMetaR"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\include" /I ".\\" /I "..\..\lib\apr\include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "SHARED_MODULE" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE MTL /nologo /D "NDEBUG" /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x809 /d "NDEBUG"
-# ADD RSC /l 0x809 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
-# ADD LINK32 ..\..\CoreR\ApacheCore.lib ..\..\lib\apr\Release\aprlib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib /nologo /subsystem:windows /dll /machine:I386
-
-!ELSEIF "$(CFG)" == "ApacheModuleCERNMeta - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir ".\Debug"
-# PROP BASE Intermediate_Dir ".\Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ".\ApacheModuleCERNMetaD"
-# PROP Intermediate_Dir ".\ApacheModuleCERNMetaD"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\include" /I ".\\" /I "..\..\lib\apr\include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "SHARED_MODULE" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE MTL /nologo /D "_DEBUG" /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x809 /d "_DEBUG"
-# ADD RSC /l 0x809 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386
-# ADD LINK32 ..\..\CoreD\ApacheCore.lib ..\..\lib\apr\Debug\aprlib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib /nologo /subsystem:windows /dll /debug /machine:I386
-
-!ENDIF
-
-# Begin Target
-
-# Name "ApacheModuleCERNMeta - Win32 Release"
-# Name "ApacheModuleCERNMeta - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
-# Begin Source File
-
-SOURCE=..\..\modules\standard\mod_cern_meta.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
-# Begin Source File
-
-SOURCE=.\readdir.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/modules/metadata/mod_expires.dsp b/modules/metadata/mod_expires.dsp
deleted file mode 100644
index 29bdf37974..0000000000
--- a/modules/metadata/mod_expires.dsp
+++ /dev/null
@@ -1,115 +0,0 @@
-# Microsoft Developer Studio Project File - Name="ApacheModuleExpires" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 5.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-CFG=ApacheModuleExpires - Win32 Release
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "ApacheModuleExpires.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "ApacheModuleExpires.mak"\
- CFG="ApacheModuleExpires - Win32 Release"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "ApacheModuleExpires - Win32 Release" (based on\
- "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "ApacheModuleExpires - Win32 Debug" (based on\
- "Win32 (x86) Dynamic-Link Library")
-!MESSAGE
-
-# Begin Project
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "ApacheModuleExpires - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir ".\Release"
-# PROP BASE Intermediate_Dir ".\Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ".\ApacheModuleExpiresR"
-# PROP Intermediate_Dir ".\ApacheModuleExpiresR"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\include" /I ".\\" /I "..\..\lib\apr\include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "SHARED_MODULE" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE MTL /nologo /D "NDEBUG" /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x809 /d "NDEBUG"
-# ADD RSC /l 0x809 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
-# ADD LINK32 ..\..\CoreR\ApacheCore.lib ..\..\lib\apr\Release\aprlib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib /nologo /subsystem:windows /dll /machine:I386
-
-!ELSEIF "$(CFG)" == "ApacheModuleExpires - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir ".\Debug"
-# PROP BASE Intermediate_Dir ".\Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ".\ApacheModuleExpiresD"
-# PROP Intermediate_Dir ".\ApacheModuleExpiresD"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\include" /I ".\\" /I "..\..\lib\apr\include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "SHARED_MODULE" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE MTL /nologo /D "_DEBUG" /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x809 /d "_DEBUG"
-# ADD RSC /l 0x809 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386
-# ADD LINK32 ..\..\CoreD\ApacheCore.lib ..\..\lib\apr\Debug\aprlib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib /nologo /subsystem:windows /dll /debug /machine:I386
-
-!ENDIF
-
-# Begin Target
-
-# Name "ApacheModuleExpires - Win32 Release"
-# Name "ApacheModuleExpires - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
-# Begin Source File
-
-SOURCE=..\..\modules\standard\mod_expires.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
-# Begin Source File
-
-SOURCE=.\readdir.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/modules/metadata/mod_headers.dsp b/modules/metadata/mod_headers.dsp
deleted file mode 100644
index 6d8ceec155..0000000000
--- a/modules/metadata/mod_headers.dsp
+++ /dev/null
@@ -1,115 +0,0 @@
-# Microsoft Developer Studio Project File - Name="ApacheModuleHeaders" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 5.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-CFG=ApacheModuleHeaders - Win32 Release
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "ApacheModuleHeaders.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "ApacheModuleHeaders.mak"\
- CFG="ApacheModuleHeaders - Win32 Release"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "ApacheModuleHeaders - Win32 Release" (based on\
- "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "ApacheModuleHeaders - Win32 Debug" (based on\
- "Win32 (x86) Dynamic-Link Library")
-!MESSAGE
-
-# Begin Project
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "ApacheModuleHeaders - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir ".\Release"
-# PROP BASE Intermediate_Dir ".\Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ".\ApacheModuleHeadersR"
-# PROP Intermediate_Dir ".\ApacheModuleHeadersR"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\include" /I ".\\" /I "..\..\lib\apr\include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "SHARED_MODULE" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE MTL /nologo /D "NDEBUG" /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x809 /d "NDEBUG"
-# ADD RSC /l 0x809 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
-# ADD LINK32 ..\..\CoreR\ApacheCore.lib ..\..\lib\apr\Release\aprlib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib /nologo /subsystem:windows /dll /machine:I386
-
-!ELSEIF "$(CFG)" == "ApacheModuleHeaders - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir ".\Debug"
-# PROP BASE Intermediate_Dir ".\Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ".\ApacheModuleHeadersD"
-# PROP Intermediate_Dir ".\ApacheModuleHeadersD"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\include" /I ".\\" /I "..\..\lib\apr\include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "SHARED_MODULE" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE MTL /nologo /D "_DEBUG" /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x809 /d "_DEBUG"
-# ADD RSC /l 0x809 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386
-# ADD LINK32 ..\..\CoreD\ApacheCore.lib ..\..\lib\apr\Debug\aprlib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib /nologo /subsystem:windows /dll /debug /machine:I386
-
-!ENDIF
-
-# Begin Target
-
-# Name "ApacheModuleHeaders - Win32 Release"
-# Name "ApacheModuleHeaders - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
-# Begin Source File
-
-SOURCE=..\..\modules\standard\mod_headers.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
-# Begin Source File
-
-SOURCE=.\readdir.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/modules/metadata/mod_usertrack.dsp b/modules/metadata/mod_usertrack.dsp
deleted file mode 100644
index 0a5d19325f..0000000000
--- a/modules/metadata/mod_usertrack.dsp
+++ /dev/null
@@ -1,115 +0,0 @@
-# Microsoft Developer Studio Project File - Name="ApacheModuleUserTrack" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 5.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-CFG=ApacheModuleUserTrack - Win32 Release
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "ApacheModuleUserTrack.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "ApacheModuleUserTrack.mak"\
- CFG="ApacheModuleUserTrack - Win32 Release"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "ApacheModuleUserTrack - Win32 Release" (based on\
- "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "ApacheModuleUserTrack - Win32 Debug" (based on\
- "Win32 (x86) Dynamic-Link Library")
-!MESSAGE
-
-# Begin Project
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "ApacheModuleUserTrack - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir ".\Release"
-# PROP BASE Intermediate_Dir ".\Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ".\ApacheModuleUserTrackR"
-# PROP Intermediate_Dir ".\ApacheModuleUserTrackR"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\include" /I ".\\" /I "..\..\lib\apr\include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "SHARED_MODULE" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE MTL /nologo /D "NDEBUG" /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x809 /d "NDEBUG"
-# ADD RSC /l 0x809 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
-# ADD LINK32 ..\..\CoreR\ApacheCore.lib ..\..\lib\apr\Release\aprlib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib /nologo /subsystem:windows /dll /machine:I386
-
-!ELSEIF "$(CFG)" == "ApacheModuleUserTrack - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir ".\Debug"
-# PROP BASE Intermediate_Dir ".\Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ".\ApacheModuleUserTrackD"
-# PROP Intermediate_Dir ".\ApacheModuleUserTrackD"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\include" /I ".\\" /I "..\..\lib\apr\include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "SHARED_MODULE" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE MTL /nologo /D "_DEBUG" /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x809 /d "_DEBUG"
-# ADD RSC /l 0x809 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386
-# ADD LINK32 ..\..\CoreD\ApacheCore.lib ..\..\lib\apr\Debug\aprlib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib /nologo /subsystem:windows /dll /debug /machine:I386
-
-!ENDIF
-
-# Begin Target
-
-# Name "ApacheModuleUserTrack - Win32 Release"
-# Name "ApacheModuleUserTrack - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
-# Begin Source File
-
-SOURCE=..\..\modules\standard\mod_usertrack.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
-# Begin Source File
-
-SOURCE=.\readdir.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/modules/proxy/mod_proxy.dsp b/modules/proxy/mod_proxy.dsp
deleted file mode 100644
index 6ee5cf30dd..0000000000
--- a/modules/proxy/mod_proxy.dsp
+++ /dev/null
@@ -1,133 +0,0 @@
-# Microsoft Developer Studio Project File - Name="ApacheModuleProxy" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 5.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-CFG=ApacheModuleProxy - Win32 Release
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "ApacheModuleProxy.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "ApacheModuleProxy.mak"\
- CFG="ApacheModuleProxy - Win32 Release"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "ApacheModuleProxy - Win32 Release" (based on\
- "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "ApacheModuleProxy - Win32 Debug" (based on\
- "Win32 (x86) Dynamic-Link Library")
-!MESSAGE
-
-# Begin Project
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "ApacheModuleProxy - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir ".\ApacheMo"
-# PROP BASE Intermediate_Dir ".\ApacheMo"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ".\Release"
-# PROP Intermediate_Dir ".\Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "SHARED_MODULE" /D "WIN32_LEAN_AND_MEAN" /YX /FD /c
-# ADD BASE MTL /nologo /D "NDEBUG" /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x809 /d "NDEBUG"
-# ADD RSC /l 0x809 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
-# ADD LINK32 ..\..\CoreR\ApacheCore.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ws2_32.lib /nologo /subsystem:windows /dll /machine:I386
-
-!ELSEIF "$(CFG)" == "ApacheModuleProxy - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir ".\ApacheM0"
-# PROP BASE Intermediate_Dir ".\ApacheM0"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ".\Debug"
-# PROP Intermediate_Dir ".\Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "SHARED_MODULE" /D "WIN32_LEAN_AND_MEAN" /YX /FD /c
-# ADD BASE MTL /nologo /D "_DEBUG" /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x809 /d "_DEBUG"
-# ADD RSC /l 0x809 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386
-# ADD LINK32 ..\..\CoreD\ApacheCore.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ws2_32.lib /nologo /subsystem:windows /dll /debug /machine:I386
-
-!ENDIF
-
-# Begin Target
-
-# Name "ApacheModuleProxy - Win32 Release"
-# Name "ApacheModuleProxy - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
-# Begin Source File
-
-SOURCE=.\mod_proxy.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\proxy_cache.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\proxy_connect.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\proxy_ftp.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\proxy_http.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\proxy_util.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
-# Begin Source File
-
-SOURCE=.\mod_proxy.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/server/mpm/winnt/mpm_winnt.c b/server/mpm/winnt/mpm_winnt.c
deleted file mode 100644
index c5e2c3bbea..0000000000
--- a/server/mpm/winnt/mpm_winnt.c
+++ /dev/null
@@ -1,1863 +0,0 @@
-/* ====================================================================
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 2000 The Apache Software Foundation. All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgment:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowledgment may appear in the software itself,
- * if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Apache" and "Apache Software Foundation" must
- * not be used to endorse or promote products derived from this
- * software without prior written permission. For written
- * permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- * nor may "Apache" appear in their name, without prior written
- * permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation. For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
- * Portions of this software are based upon public domain software
- * originally written at the National Center for Supercomputing Applications,
- * University of Illinois, Urbana-Champaign.
- */
-
-#define CORE_PRIVATE
-#include "apr_portable.h"
-#include "httpd.h"
-#include "http_main.h"
-#include "http_log.h"
-#include "http_config.h" /* for read_config */
-#include "http_core.h" /* for get_remote_host */
-#include "http_connection.h"
-#include "ap_mpm.h"
-#include "ap_config.h"
-#include "ap_listen.h"
-#include "mpm_default.h"
-#include "service.h"
-#include "iol_socket.h"
-#include "winnt.h"
-
-
-/*
- * Definitions of WINNT MPM specific config globals
- */
-
-static char *ap_pid_fname = NULL;
-static int ap_threads_per_child = 0;
-static int workers_may_exit = 0;
-static int max_requests_per_child = 0;
-
-static struct fd_set listenfds;
-static int num_listenfds = 0;
-static SOCKET listenmaxfd = INVALID_SOCKET;
-
-static ap_context_t *pconf; /* Pool for config stuff */
-
-static char ap_coredump_dir[MAX_STRING_LEN];
-
-static server_rec *server_conf;
-static HANDLE AcceptExCompPort = NULL;
-
-static int one_process = 0;
-
-static OSVERSIONINFO osver; /* VER_PLATFORM_WIN32_NT */
-
-int ap_max_requests_per_child=0;
-int ap_daemons_to_start=0;
-
-static event *exit_event;
-ap_lock_t *start_mutex;
-int my_pid;
-int parent_pid;
-
-static ap_status_t socket_cleanup(void *sock)
-{
- struct socket_t *thesocket = sock;
- SOCKET sd;
- if (ap_get_os_sock(&sd, thesocket) == APR_SUCCESS) {
- closesocket(sd);
- }
- return APR_SUCCESS;
-}
-
-/* A bunch or routines from os/win32/multithread.c that need to be merged into APR
- * or thrown out entirely...
- */
-
-
-typedef void semaphore;
-typedef void event;
-
-static semaphore *
-create_semaphore(int initial)
-{
- return(CreateSemaphore(NULL, initial, 1000000, NULL));
-}
-
-static void acquire_semaphore(semaphore *semaphore_id)
-{
- int rv;
-
- rv = WaitForSingleObject(semaphore_id, INFINITE);
-
- return;
-}
-
-static int release_semaphore(semaphore *semaphore_id)
-{
- return(ReleaseSemaphore(semaphore_id, 1, NULL));
-}
-
-static void destroy_semaphore(semaphore *semaphore_id)
-{
- CloseHandle(semaphore_id);
-}
-
-
-/* To share the semaphores with other processes, we need a NULL ACL
- * Code from MS KB Q106387
- */
-static PSECURITY_ATTRIBUTES GetNullACL()
-{
- PSECURITY_DESCRIPTOR pSD;
- PSECURITY_ATTRIBUTES sa;
-
- sa = (PSECURITY_ATTRIBUTES) LocalAlloc(LPTR, sizeof(SECURITY_ATTRIBUTES));
- pSD = (PSECURITY_DESCRIPTOR) LocalAlloc(LPTR,
- SECURITY_DESCRIPTOR_MIN_LENGTH);
- if (pSD == NULL || sa == NULL) {
- return NULL;
- }
- if (!InitializeSecurityDescriptor(pSD, SECURITY_DESCRIPTOR_REVISION)
- || GetLastError()) {
- LocalFree( pSD );
- LocalFree( sa );
- return NULL;
- }
- if (!SetSecurityDescriptorDacl(pSD, TRUE, (PACL) NULL, FALSE)
- || GetLastError()) {
- LocalFree( pSD );
- LocalFree( sa );
- return NULL;
- }
- sa->nLength = sizeof(sa);
- sa->lpSecurityDescriptor = pSD;
- sa->bInheritHandle = TRUE;
- return sa;
-}
-
-static void CleanNullACL( void *sa ) {
- if( sa ) {
- LocalFree( ((PSECURITY_ATTRIBUTES)sa)->lpSecurityDescriptor);
- LocalFree( sa );
- }
-}
-
-/*
- * The Win32 call WaitForMultipleObjects will only allow you to wait for
- * a maximum of MAXIMUM_WAIT_OBJECTS (current 64). Since the threading
- * model in the multithreaded version of apache wants to use this call,
- * we are restricted to a maximum of 64 threads. This is a simplistic
- * routine that will increase this size.
- */
-static DWORD wait_for_many_objects(DWORD nCount, CONST HANDLE *lpHandles,
- DWORD dwSeconds)
-{
- time_t tStopTime;
- DWORD dwRet = WAIT_TIMEOUT;
- DWORD dwIndex=0;
- BOOL bFirst = TRUE;
-
- tStopTime = time(NULL) + dwSeconds;
-
- do {
- if (!bFirst)
- Sleep(1000);
- else
- bFirst = FALSE;
-
- for (dwIndex = 0; dwIndex * MAXIMUM_WAIT_OBJECTS < nCount; dwIndex++) {
- dwRet = WaitForMultipleObjects(
- min(MAXIMUM_WAIT_OBJECTS, nCount - (dwIndex * MAXIMUM_WAIT_OBJECTS)),
- lpHandles + (dwIndex * MAXIMUM_WAIT_OBJECTS),
- 0, 0);
-
- if (dwRet != WAIT_TIMEOUT) {
- break;
- }
- }
- } while((time(NULL) < tStopTime) && (dwRet == WAIT_TIMEOUT));
-
- return dwRet;
-}
-
-/*
- * Signalling Apache on NT.
- *
- * Under Unix, Apache can be told to shutdown or restart by sending various
- * signals (HUP, USR, TERM). On NT we don't have easy access to signals, so
- * we use "events" instead. The parent apache process goes into a loop
- * where it waits forever for a set of events. Two of those events are
- * called
- *
- * apPID_shutdown
- * apPID_restart
- *
- * (where PID is the PID of the apache parent process). When one of these
- * is signalled, the Apache parent performs the appropriate action. The events
- * can become signalled through internal Apache methods (e.g. if the child
- * finds a fatal error and needs to kill its parent), via the service
- * control manager (the control thread will signal the shutdown event when
- * requested to stop the Apache service), from the -k Apache command line,
- * or from any external program which finds the Apache PID from the
- * httpd.pid file.
- *
- * The signal_parent() function, below, is used to signal one of these events.
- * It can be called by any child or parent process, since it does not
- * rely on global variables.
- *
- * On entry, type gives the event to signal. 0 means shutdown, 1 means
- * graceful restart.
- */
-static void signal_parent(int type)
-{
- HANDLE e;
- char *signal_name;
- extern char signal_shutdown_name[];
- extern char signal_restart_name[];
-
- /* after updating the shutdown_pending or restart flags, we need
- * to wake up the parent process so it can see the changes. The
- * parent will normally be waiting for either a child process
- * to die, or for a signal on the "spache-signal" event. So set the
- * "apache-signal" event here.
- */
- if (one_process) {
- return;
- }
-
- switch(type) {
- case 0: signal_name = signal_shutdown_name; break;
- case 1: signal_name = signal_restart_name; break;
- default: return;
- }
- e = OpenEvent(EVENT_ALL_ACCESS, FALSE, signal_name);
- if (!e) {
- /* Um, problem, can't signal the parent, which means we can't
- * signal ourselves to die. Ignore for now...
- */
- ap_log_error(APLOG_MARK, APLOG_EMERG, GetLastError(), server_conf,
- "OpenEvent on %s event", signal_name);
- return;
- }
- if (SetEvent(e) == 0) {
- /* Same problem as above */
- ap_log_error(APLOG_MARK, APLOG_EMERG, GetLastError(), server_conf,
- "SetEvent on %s event", signal_name);
- CloseHandle(e);
- return;
- }
- CloseHandle(e);
-}
-static int volatile is_graceful = 0;
-API_EXPORT(int) ap_graceful_stop_signalled(void)
-{
- return is_graceful;
-}
-void ap_start_shutdown(void)
-{
- signal_parent(0);
-}
-/*
- * Initialise the signal names, in the global variables signal_name_prefix,
- * signal_restart_name and signal_shutdown_name.
- */
-
-#define MAX_SIGNAL_NAME 30 /* Long enough for apPID_shutdown, where PID is an int */
-char signal_name_prefix[MAX_SIGNAL_NAME];
-char signal_restart_name[MAX_SIGNAL_NAME];
-char signal_shutdown_name[MAX_SIGNAL_NAME];
-static void setup_signal_names(char *prefix)
-{
- ap_snprintf(signal_name_prefix, sizeof(signal_name_prefix), prefix);
- ap_snprintf(signal_shutdown_name, sizeof(signal_shutdown_name),
- "%s_shutdown", signal_name_prefix);
- ap_snprintf(signal_restart_name, sizeof(signal_restart_name),
- "%s_restart", signal_name_prefix);
-}
-
-/*
- * Routines that deal with sockets, some are WIN32 specific...
- */
-static int s_iInitCount = 0;
-static int AMCSocketInitialize(void)
-{
- int iVersionRequested;
- WSADATA wsaData;
- int err;
-
- if (s_iInitCount > 0) {
- s_iInitCount++;
- return (0);
- }
- else if (s_iInitCount < 0)
- return (s_iInitCount);
-
- /* s_iInitCount == 0. Do the initailization */
- iVersionRequested = MAKEWORD(2, 0);
- err = WSAStartup((WORD) iVersionRequested, &wsaData);
- if (err) {
- s_iInitCount = -1;
- return (s_iInitCount);
- }
- if (LOBYTE(wsaData.wVersion) != 1 ||
- HIBYTE(wsaData.wVersion) != 1) {
- s_iInitCount = -2;
- WSACleanup();
- return (s_iInitCount);
- }
-
- s_iInitCount++;
- return (s_iInitCount);
-
-}
-static void AMCSocketCleanup(void)
-{
- if (--s_iInitCount == 0)
- WSACleanup();
- return;
-}
-
-static void sock_disable_nagle(int s)
-{
- /* The Nagle algorithm says that we should delay sending partial
- * packets in hopes of getting more data. We don't want to do
- * this; we are not telnet. There are bad interactions between
- * persistent connections and Nagle's algorithm that have very severe
- * performance penalties. (Failing to disable Nagle is not much of a
- * problem with simple HTTP.)
- *
- * In spite of these problems, failure here is not a shooting offense.
- */
- int just_say_no = 1;
-
- if (setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char *) &just_say_no,
- sizeof(int)) < 0) {
- ap_log_error(APLOG_MARK, APLOG_WARNING, APR_SUCCESS, server_conf,
- "setsockopt: (TCP_NODELAY)");
- }
-}
-
-/*
- * Routines to deal with managing the list of listening sockets.
- */
-static ap_listen_rec *head_listener;
-static ap_inline ap_listen_rec *find_ready_listener(fd_set * main_fds)
-{
- ap_listen_rec *lr;
- SOCKET nsd;
-
- for (lr = head_listener; lr ; lr = lr->next) {
- ap_get_os_sock(&nsd, lr->sd);
- if (FD_ISSET(nsd, main_fds)) {
- head_listener = lr->next;
- if (head_listener == NULL)
- head_listener = ap_listeners;
-
- return (lr);
- }
- }
- return NULL;
-}
-static int setup_listeners(server_rec *s)
-{
- ap_listen_rec *lr;
- int num_listeners = 0;
- SOCKET nsd;
-
- /* Setup the listeners */
- FD_ZERO(&listenfds);
-
- if (ap_listen_open(s->process, s->port)) {
- return 0;
- }
- for (lr = ap_listeners; lr; lr = lr->next) {
- num_listeners++;
- if (lr->sd != NULL) {
- ap_get_os_sock(&nsd, lr->sd);
- FD_SET(nsd, &listenfds);
- if (listenmaxfd == INVALID_SOCKET || nsd > listenmaxfd) {
- listenmaxfd = nsd;
- }
- }
- lr->count = 0;
- }
-
- head_listener = ap_listeners;
-
- return num_listeners;
-}
-
-static int setup_inherited_listeners(server_rec *s)
-{
- WSAPROTOCOL_INFO WSAProtocolInfo;
- HANDLE pipe;
- ap_listen_rec *lr;
- DWORD BytesRead;
- int num_listeners = 0;
- SOCKET nsd;
-
- /* Setup the listeners */
- FD_ZERO(&listenfds);
-
- /* Set up a default listener if necessary */
-
- if (ap_listeners == NULL) {
- ap_listen_rec *lr;
- lr = ap_palloc(s->process->pool, sizeof(ap_listen_rec));
- if (!lr)
- return 0;
- lr->sd = NULL;
- lr->next = ap_listeners;
- ap_listeners = lr;
- }
-
- /* Open the pipe to the parent process to receive the inherited socket
- * data. The sockets have been set to listening in the parent process.
- */
- pipe = GetStdHandle(STD_INPUT_HANDLE);
- for (lr = ap_listeners; lr; lr = lr->next) {
- if (!ReadFile(pipe, &WSAProtocolInfo, sizeof(WSAPROTOCOL_INFO),
- &BytesRead, (LPOVERLAPPED) NULL)) {
- ap_log_error(APLOG_MARK, APLOG_CRIT, GetLastError(), server_conf,
- "setup_inherited_listeners: Unable to read socket data from parent");
- signal_parent(0); /* tell parent to die */
- exit(1);
- }
- ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, APR_SUCCESS, server_conf,
- "Child %d: setup_inherited_listener() read = %d bytes of WSAProtocolInfo.", my_pid);
- nsd = WSASocket(FROM_PROTOCOL_INFO, FROM_PROTOCOL_INFO, FROM_PROTOCOL_INFO,
- &WSAProtocolInfo, 0, 0);
- if (nsd == INVALID_SOCKET) {
- ap_log_error(APLOG_MARK, APLOG_CRIT, WSAGetLastError(), server_conf,
- "Child %d: setup_inherited_listeners(), WSASocket failed to open the inherited socket.", my_pid);
- signal_parent(0); /* tell parent to die */
- exit(1);
- }
- if (nsd >= 0) {
- FD_SET(nsd, &listenfds);
- if (listenmaxfd == INVALID_SOCKET || nsd > listenmaxfd) {
- listenmaxfd = nsd;
- }
- }
-// ap_register_cleanup(p, (void *)lr->sd, socket_cleanup, ap_null_cleanup);
- ap_put_os_sock(&lr->sd, &nsd, pconf);
- lr->count = 0;
- }
- /* Now, read the AcceptExCompPort from the parent */
- ReadFile(pipe, &AcceptExCompPort, sizeof(AcceptExCompPort), &BytesRead, (LPOVERLAPPED) NULL);
- CloseHandle(pipe);
-
- for (lr = ap_listeners; lr; lr = lr->next) {
- num_listeners++;
- }
-
- head_listener = ap_listeners;
- return num_listeners;
-}
-
-
-/**********************************************************************
- * Multithreaded implementation
- *
- * This code is fairly specific to Win32.
- *
- * The model used to handle requests is a set of threads. One "main"
- * thread listens for new requests. When something becomes
- * available, it does a select and places the newly available socket
- * onto a list of "jobs" (add_job()). Then any one of a fixed number
- * of "worker" threads takes the top job off the job list with
- * remove_job() and handles that connection to completion. After
- * the connection has finished the thread is free to take another
- * job from the job list.
- *
- * In the code, the "main" thread is running within the child_main()
- * function. The first thing this function does is create the
- * worker threads, which operate in the child_sub_main() function. The
- * main thread then goes into a loop within child_main() where they
- * do a select() on the listening sockets. The select times out once
- * per second so that the thread can check for an "exit" signal
- * from the parent process (see below). If this signal is set, the
- * thread can exit, but only after it has accepted all incoming
- * connections already in the listen queue (since Win32 appears
- * to through away listened but unaccepted connections when a
- * process dies).
- *
- * Because the main and worker threads exist within a single process
- * they are vulnerable to crashes or memory leaks (crashes can also
- * be caused within modules, of course). There also needs to be a
- * mechanism to perform restarts and shutdowns. This is done by
- * creating the main & worker threads within a subprocess. A
- * main process (the "parent process") creates one (or more)
- * processes to do the work, then the parent sits around waiting
- * for the working process to die, in which case it starts a new
- * one. The parent process also handles restarts (by creating
- * a new working process then signalling the previous working process
- * exit ) and shutdowns (by signalling the working process to exit).
- * The parent process operates within the master_main() function. This
- * process also handles requests from the service manager (NT only).
- *
- * Signalling between the parent and working process uses a Win32
- * event. Each child has a unique name for the event, which is
- * passed to it with the -Z argument when the child is spawned. The
- * parent sets (signals) this event to tell the child to die.
- * At present all children do a graceful die - they finish all
- * current jobs _and_ empty the listen queue before they exit.
- * A non-graceful die would need a second event. The -Z argument in
- * the child is also used to create the shutdown and restart events,
- * since the prefix (apPID) contains the parent process PID.
- *
- * The code below starts with functions at the lowest level -
- * worker threads, and works up to the top level - the main()
- * function of the parent process.
- *
- * The scoreboard (in process memory) contains details of the worker
- * threads (within the active working process). There is no shared
- * "scoreboard" between processes, since only one is ever active
- * at once (or at most, two, when one has been told to shutdown but
- * is processes outstanding requests, and a new one has been started).
- * This is controlled by a "start_mutex" which ensures only one working
- * process is active at once.
- **********************************************************************/
-
-
-/*
- * Definition of jobs, shared by main and worker threads.
- */
-
-typedef struct joblist_s {
- struct joblist_s *next;
- int sock;
-} joblist;
-
-/*
- * Globals common to main and worker threads. This structure is not
- * used by the parent process.
- */
-
-typedef struct globals_s {
- semaphore *jobsemaphore;
- joblist *jobhead;
- joblist *jobtail;
- ap_lock_t *jobmutex;
- int jobcount;
-} globals;
-
-globals allowed_globals =
-{NULL, NULL, NULL, NULL, 0};
-#define MAX_SELECT_ERRORS 100
-#define PADDED_ADDR_SIZE sizeof(SOCKADDR_IN)+16
-
-/* Windows 9x specific code...
- * Accept processing for on Windows 95/98 uses a producer/consumer queue
- * model. A single thread accepts connections and queues the accepted socket
- * to the accept queue for consumption by a pool of worker threads.
- *
- * win9x_get_connection()
- * Calls remove_job() to pull a job from the accept queue. All the worker
- * threads block on remove_job.
- * accept_and_queue_connections()
- * The accept threads runs this function, which accepts connections off
- * the network and calls add_job() to queue jobs to the accept_queue.
- * add_job()/remove_job()
- * Add or remove an accepted socket from the list of sockets
- * connected to clients. allowed_globals.jobmutex protects
- * against multiple concurrent access to the linked list of jobs.
- */
-static void add_job(int sock)
-{
- joblist *new_job;
-
- new_job = (joblist *) malloc(sizeof(joblist));
- if (new_job == NULL) {
- ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL,
- "Ouch! Out of memory in add_job()!");
- return;
- }
- new_job->next = NULL;
- new_job->sock = sock;
-
- ap_lock(allowed_globals.jobmutex);
-
- if (allowed_globals.jobtail != NULL)
- allowed_globals.jobtail->next = new_job;
- allowed_globals.jobtail = new_job;
- if (!allowed_globals.jobhead)
- allowed_globals.jobhead = new_job;
- allowed_globals.jobcount++;
- release_semaphore(allowed_globals.jobsemaphore);
-
- ap_unlock(allowed_globals.jobmutex);
-}
-
-static int remove_job(void)
-{
- joblist *job;
- int sock;
-
- acquire_semaphore(allowed_globals.jobsemaphore);
- ap_lock(allowed_globals.jobmutex);
-
- if (workers_may_exit && !allowed_globals.jobhead) {
- ap_unlock(allowed_globals.jobmutex);
- return (-1);
- }
- job = allowed_globals.jobhead;
- ap_assert(job);
- allowed_globals.jobhead = job->next;
- if (allowed_globals.jobhead == NULL)
- allowed_globals.jobtail = NULL;
- ap_unlock(allowed_globals.jobmutex);
- sock = job->sock;
- free(job);
-
- return (sock);
-}
-
-static void accept_and_queue_connections(void * dummy)
-{
- int requests_this_child = 0;
- struct timeval tv;
- fd_set main_fds;
- int wait_time = 1;
- int csd;
- int nsd = INVALID_SOCKET;
- struct sockaddr_in sa_client;
- int count_select_errors = 0;
- int rc;
- int clen;
-
- while (!workers_may_exit) {
- if (ap_max_requests_per_child && (requests_this_child > ap_max_requests_per_child)) {
- break;
- }
-
- tv.tv_sec = wait_time;
- tv.tv_usec = 0;
- memcpy(&main_fds, &listenfds, sizeof(fd_set));
-
-// rc = ap_select(listenmaxfd + 1, &main_fds, NULL, NULL, &tv);
- rc = select(listenmaxfd + 1, &main_fds, NULL, NULL, &tv);
-
- if (rc == 0 || (rc == SOCKET_ERROR && h_errno == WSAEINTR)) {
- count_select_errors = 0; /* reset count of errors */
- continue;
- }
- else if (rc == SOCKET_ERROR) {
- /* A "real" error occurred, log it and increment the count of
- * select errors. This count is used to ensure we don't go into
- * a busy loop of continuous errors.
- */
- ap_log_error(APLOG_MARK, APLOG_INFO, h_errno, server_conf,
- "select failed with errno %d", h_errno);
- count_select_errors++;
- if (count_select_errors > MAX_SELECT_ERRORS) {
- workers_may_exit = 1;
- ap_log_error(APLOG_MARK, APLOG_ERR, h_errno, server_conf,
- "Too many errors in select loop. Child process exiting.");
- break;
- }
- } else {
- ap_listen_rec *lr;
-
- lr = find_ready_listener(&main_fds);
- if (lr != NULL) {
- /* fetch the native socket descriptor */
- ap_get_os_sock(&nsd, lr->sd);
- }
- }
-
- do {
- clen = sizeof(sa_client);
- csd = accept(nsd, (struct sockaddr *) &sa_client, &clen);
- if (csd == INVALID_SOCKET) {
- csd = -1;
- }
- } while (csd < 0 && h_errno == WSAEINTR);
-
- if (csd < 0) {
- if (h_errno != WSAECONNABORTED) {
- ap_log_error(APLOG_MARK, APLOG_ERR, h_errno, server_conf,
- "accept: (client socket)");
- }
- }
- else {
- add_job(csd);
- requests_this_child++;
- }
- }
- SetEvent(exit_event);
-}
-static PCOMP_CONTEXT win9x_get_connection(PCOMP_CONTEXT context)
-{
- int len;
-
- if (context == NULL) {
- /* allocate the completion context and the transaction pool */
- context = ap_pcalloc(pconf, sizeof(COMP_CONTEXT));
- if (!context) {
- ap_log_error(APLOG_MARK,APLOG_ERR, GetLastError(), server_conf,
- "win9x_get_connection: ap_pcalloc() failed. Process will exit.");
- return NULL;
- }
- ap_create_context(&context->ptrans, pconf);
- }
-
-
- while (1) {
- ap_clear_pool(context->ptrans);
- context->accept_socket = remove_job();
- if (context->accept_socket == -1) {
- return NULL;
- }
- //ap_note_cleanups_for_socket(ptrans, csd);
- len = sizeof(struct sockaddr);
- context->sa_server = ap_palloc(context->ptrans, len);
- if (getsockname(context->accept_socket,
- context->sa_server, &len)== SOCKET_ERROR) {
- ap_log_error(APLOG_MARK, APLOG_WARNING, WSAGetLastError(), server_conf,
- "getsockname failed");
- continue;
- }
- len = sizeof(struct sockaddr);
- context->sa_client = ap_palloc(context->ptrans, len);
- if ((getpeername(context->accept_socket,
- context->sa_client, &len)) == SOCKET_ERROR) {
- ap_log_error(APLOG_MARK, APLOG_WARNING, h_errno, server_conf,
- "getpeername failed with error %d\n", WSAGetLastError());
- memset(&context->sa_client, '\0', sizeof(context->sa_client));
- }
-
- context->conn_io = ap_bcreate(context->ptrans, B_RDWR);
-
- /* do we NEED_DUPPED_CSD ?? */
-
- return context;
- }
-}
-
-/*
- * Windows 2000/NT specific code...
- * create_acceptex_context()
- * reset_acceptex_context()
- * drain_acceptex_complport()
- * winnt_get_connection()
- *
- * TODO: Insert a discussion of 'completion contexts' and what these function do here...
- */
-static void drain_acceptex_complport(HANDLE hComplPort, BOOLEAN bCleanUp)
-{
- LPOVERLAPPED pol;
- PCOMP_CONTEXT context;
- int rc;
- DWORD BytesRead;
- DWORD CompKey;
- int lastError;
-
- while (1) {
- context = NULL;
- rc = GetQueuedCompletionStatus(hComplPort, &BytesRead, &CompKey,
- &pol, 1000);
- if (!rc) {
- lastError = GetLastError();
- if (lastError == ERROR_OPERATION_ABORTED) {
- ap_log_error(APLOG_MARK,APLOG_INFO,lastError, server_conf,
- "Child: %d - Draining a packet off the completion port.", my_pid);
- continue;
- }
- break;
- }
- ap_log_error(APLOG_MARK,APLOG_INFO,APR_SUCCESS, server_conf,
- "Child: %d - Nuking an active connection. context = %x", my_pid, context);
- context = (PCOMP_CONTEXT) pol;
- if (context && bCleanUp) {
- /* It is only valid to clean-up in the process that initiated the I/O */
- closesocket(context->accept_socket);
- CloseHandle(context->Overlapped.hEvent);
- }
- }
-}
-static int create_acceptex_context(ap_context_t *_pconf, ap_listen_rec *lr)
-{
- PCOMP_CONTEXT context;
- DWORD BytesRead;
- SOCKET nsd;
- int lasterror;
-
- /* allocate the completion context */
- context = ap_pcalloc(_pconf, sizeof(COMP_CONTEXT));
- if (!context) {
- ap_log_error(APLOG_MARK,APLOG_ERR, GetLastError(), server_conf,
- "create_acceptex_context: ap_pcalloc() failed. Process will exit.");
- return -1;
- }
-
- /* initialize the completion context */
- context->lr = lr;
- context->Overlapped.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
- if (context->Overlapped.hEvent == NULL) {
- ap_log_error(APLOG_MARK,APLOG_ERR, GetLastError(), server_conf,
- "create_acceptex_context: CreateEvent() failed. Process will exit.");
- return -1;
- }
- context->accept_socket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
- if (context->accept_socket == INVALID_SOCKET) {
- ap_log_error(APLOG_MARK,APLOG_ERR, WSAGetLastError(), server_conf,
- "create_acceptex_context: socket() failed. Process will exit.");
- return -1;
- }
- ap_create_context(&context->ptrans, _pconf);
- context->conn_io = ap_bcreate(context->ptrans, B_RDWR);
- context->recv_buf = context->conn_io->inbase;
- context->recv_buf_size = context->conn_io->bufsiz - 2*PADDED_ADDR_SIZE;
- ap_get_os_sock(&nsd, context->lr->sd);
-
- /* AcceptEx on the completion context. The completion context will be signaled
- * when a connection is accepted. */
- if (!AcceptEx(nsd, context->accept_socket,
- context->recv_buf,
- 0, //context->recv_buf_size,
- PADDED_ADDR_SIZE, PADDED_ADDR_SIZE,
- &BytesRead,
- (LPOVERLAPPED) context)) {
- lasterror = WSAGetLastError();
- if (lasterror != ERROR_IO_PENDING) {
- ap_log_error(APLOG_MARK,APLOG_ERR, WSAGetLastError(), server_conf,
- "create_acceptex_context: AcceptEx failed. Process will exit.");
- return -1;
- }
- }
- lr->count++;
-
- return 0;
-}
-static ap_inline int reset_acceptex_context(PCOMP_CONTEXT context)
-{
- DWORD BytesRead;
- SOCKET nsd;
- int lasterror;
-
- context->lr->count++;
-
- if (context->accept_socket == -1)
- context->accept_socket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
-
- if (context->accept_socket == INVALID_SOCKET) {
- ap_log_error(APLOG_MARK,APLOG_ERR, WSAGetLastError(), server_conf,
- "reset_acceptex_context: socket() failed. Process will exit.");
- return -1;
- }
-
- ap_clear_pool(context->ptrans);
- context->sock = NULL;
- context->conn_io = ap_bcreate(context->ptrans, B_RDWR);
- context->recv_buf = context->conn_io->inbase;
- context->recv_buf_size = context->conn_io->bufsiz - 2*PADDED_ADDR_SIZE;
- ap_get_os_sock(&nsd, context->lr->sd);
-
- if (!AcceptEx(nsd, context->accept_socket,
- context->recv_buf,
- 0, //context->recv_buf_size,
- PADDED_ADDR_SIZE, PADDED_ADDR_SIZE,
- &BytesRead, (LPOVERLAPPED) context)) {
- lasterror = WSAGetLastError();
- if (lasterror != ERROR_IO_PENDING) {
- ap_log_error(APLOG_MARK,APLOG_ERR, WSAGetLastError(), server_conf,
- "reset_acceptex_context: AcceptEx failed. Leaving the process running.");
- return -1;
- }
- }
-
- return 0;
-}
-static PCOMP_CONTEXT winnt_get_connection(PCOMP_CONTEXT context)
-{
- int requests_this_child = 0;
- int rc;
- LPOVERLAPPED pol;
- DWORD CompKey;
- DWORD BytesRead;
-
- if (context != NULL) {
- /* If child shutdown has been signaled, clean-up the completion context */
- if (workers_may_exit) {
- CloseHandle(context->Overlapped.hEvent);
- /* destroy pool */
- }
- else {
- context->accept_socket = -1; /* Don't reuse the accept_socket */
- if (reset_acceptex_context(context) == -1) {
- if (context->accept_socket != -1)
- closesocket(context->accept_socket);
- CloseHandle(context->Overlapped.hEvent);
- return NULL;
- }
- }
- }
-
- while (1) {
- rc = GetQueuedCompletionStatus(AcceptExCompPort,
- &BytesRead,
- &CompKey,
- &pol,
- INFINITE);
- if (!rc) {
- ap_log_error(APLOG_MARK,APLOG_ERR, GetLastError(), server_conf,
- "Child: %d - GetQueuedCompletionStatus() failed", my_pid);
- continue;
- }
- break;
- }
- context = (PCOMP_CONTEXT) pol;
- if (CompKey == 999) {
- return NULL;
- }
-
- /* Each listener needs at least 1 context available to receive connections on.
- * Create additional listener contexts if needed.
- */
- ap_lock(allowed_globals.jobmutex);
- context->lr->count--;
- if ((context->lr->count < 2) && !workers_may_exit) {
- if (create_acceptex_context(pconf, context->lr) == -1) {
- ap_log_error(APLOG_MARK,APLOG_ERR, GetLastError(), server_conf,
- "Unable to create an AcceptEx completion context -- process will exit");
- signal_parent(0);
- return NULL;
- }
- }
- ap_unlock(allowed_globals.jobmutex);
-
- /* Received a connection */
- context->conn_io->incnt = BytesRead;
- GetAcceptExSockaddrs(context->recv_buf,
- 0, //context->recv_buf_size,
- PADDED_ADDR_SIZE,
- PADDED_ADDR_SIZE,
- &context->sa_server,
- &context->sa_server_len,
- &context->sa_client,
- &context->sa_client_len);
-
- return context;
-
-}
-/*
- * worker_main() - this is the main loop for the worker threads
- *
- * Windows 95/98
- * Each thread runs within this function. They wait within remove_job()
- * for a job to become available, then handle all the requests on that
- * connection until it is closed, then return to remove_job().
- *
- * The worker thread will exit when it removes a job which contains
- * socket number -1. This provides a graceful thread exit, since
- * it will never exit during a connection.
- *
- * This code in this function is basically equivalent to the child_main()
- * from the multi-process (Unix) environment, except that we
- *
- * - do not call child_init_modules (child init API phase)
- * - block in remove_job, and when unblocked we have an already
- * accepted socket, instead of blocking on a mutex or select().
- */
-
-static void worker_main(int child_num)
-{
- static BOOLEAN bListenersStarted = FALSE;
- PCOMP_CONTEXT context = NULL;
-
- if (osver.dwPlatformId != VER_PLATFORM_WIN32_WINDOWS) {
- /* Windows NT/2000: Create AcceptEx completion contexts for each of the
- * listeners
- */
- ap_lock(allowed_globals.jobmutex);
- if (!bListenersStarted) {
- ap_listen_rec *lr;
- int i;
- bListenersStarted = TRUE;
- for (lr = ap_listeners; lr != NULL; lr = lr->next) {
- for(i=0; i<2; i++) {
- if (lr->count < 2)
- if (create_acceptex_context(pconf, lr) == -1) {
- ap_log_error(APLOG_MARK,APLOG_ERR, GetLastError(), server_conf,
- "Unable to create an AcceptEx completion context -- process will exit");
- signal_parent(0); /* tell parent to die */
- }
- }
- }
- }
- ap_unlock(allowed_globals.jobmutex);
- }
-
- while (1) {
- conn_rec *current_conn;
- ap_iol *iol;
-
- /* Grab a connection off the network */
- if (osver.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS) {
- context = win9x_get_connection(context);
- }
- else {
- context = winnt_get_connection(context);
- }
-
- if (!context)
- break;
- sock_disable_nagle(context->accept_socket);
- ap_put_os_sock(&context->sock, &context->accept_socket, context->ptrans);
- ap_register_cleanup(context->ptrans, context->sock, socket_cleanup, ap_null_cleanup);
- iol = win32_attach_socket(context->ptrans, context->sock);
- if (iol == NULL) {
- ap_log_error(APLOG_MARK, APLOG_ERR, APR_ENOMEM, server_conf,
- "worker_main: attach_socket() failed. Continuing...");
- closesocket(context->accept_socket);
- continue;
- }
- ap_bpush_iol(context->conn_io, iol);
- current_conn = ap_new_connection(context->ptrans, server_conf, context->conn_io,
- (struct sockaddr_in *) context->sa_client,
- (struct sockaddr_in *) context->sa_server,
- child_num);
-
- ap_process_connection(current_conn);
- }
-#if 0
- ap_log_error(APLOG_MARK, APLOG_INFO, APR_SUCCESS, server_conf,
- "child_main: Setting exit_event");
- SetEvent(exit_event);
-#endif
- /* TODO: Add code to clean-up completion contexts here */
-}
-
-static void cleanup_thread(thread **handles, int *thread_cnt, int thread_to_clean)
-{
- int i;
-
- CloseHandle(handles[thread_to_clean]);
- for (i = thread_to_clean; i < ((*thread_cnt) - 1); i++)
- handles[i] = handles[i + 1];
- (*thread_cnt)--;
-}
-
-
-
-/*
- * child_main() is main loop for the child process. The loop in
- * this function becomes the controlling thread for the actually working
- * threads (which run in a loop in child_sub_main()).
- * Globals Used:
- * exit_event, start_mutex, ap_threads_per_child, server_conf,
- * h_errno defined to WSAGetLastError in winsock2.h,
- */
-static void child_main()
-{
- int nthreads = ap_threads_per_child;
- int thread_id;
- thread **child_handles;
- int rv;
- ap_status_t status;
- time_t end_time;
- int i;
- ap_context_t *pchild;
-
- ap_create_context(&pchild, pconf);
-
-// ap_restart_time = time(NULL);
- /*
- * Wait until we have permission to start accepting connections.
- * start_mutex is used to ensure that only one child ever
- * goes into the listen/accept loop at once.
- */
- status = ap_lock(start_mutex);
- if (status != APR_SUCCESS) {
- ap_log_error(APLOG_MARK,APLOG_ERR, status, server_conf,
- "Child %d: Failed to acquire the start_mutex. Process will exit.", my_pid);
- signal_parent(0); /* tell parent to die */
- ap_destroy_context(pchild);
- exit(0);
- }
- ap_log_error(APLOG_MARK,APLOG_INFO, APR_SUCCESS, server_conf, "Child %d: Acquired the start mutex", my_pid);
-
- /* Setup the listening sockets */
- if (one_process) {
- ap_listen_rec *lr;
- setup_listeners(server_conf);
-
- /* Associate the socket with the IO Completion port */
- for (lr = ap_listeners; lr; lr = lr->next) {
- int nsd;
- ap_get_os_sock(&nsd,lr->sd);
- CreateIoCompletionPort((HANDLE) nsd, AcceptExCompPort, 0, 0);
- }
-
- } else {
- setup_inherited_listeners(server_conf);
- }
- if (listenmaxfd == INVALID_SOCKET) {
- /* No sockets were made, better log something and exit */
- ap_log_error(APLOG_MARK, APLOG_CRIT, h_errno, NULL,
- "No sockets were created for listening");
- signal_parent(0); /* tell parent to die */
- ap_destroy_context(pchild);
- exit(0);
- }
-
- allowed_globals.jobsemaphore = create_semaphore(0);
- ap_create_lock(&allowed_globals.jobmutex, APR_MUTEX, APR_INTRAPROCESS, NULL, pchild);
-
- /* Create the worker thread pool */
- ap_log_error(APLOG_MARK,APLOG_INFO, APR_SUCCESS, server_conf, "Child %d: Creating %d worker threads",my_pid, nthreads);
- child_handles = (thread *) alloca(nthreads * sizeof(int));
- for (i = 0; i < nthreads; i++) {
- child_handles[i] = (thread *) _beginthreadex(NULL, 0, (LPTHREAD_START_ROUTINE) worker_main,
- NULL, 0, &thread_id);
- }
-
- if (osver.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS) {
- /* Win95/98: Create the accept thread */
- _beginthreadex(NULL, 0, (LPTHREAD_START_ROUTINE) accept_and_queue_connections,
- (void *) i, 0, &thread_id);
- }
-
- /* Wait for the exit event to be signaled by the parent process */
- rv = WaitForSingleObject(exit_event, INFINITE);
-
- ap_log_error(APLOG_MARK,APLOG_INFO, APR_SUCCESS, server_conf,
- "Child %d: Exit event signaled. Child process is ending.", my_pid);
- workers_may_exit = 1;
-
- /* Shutdown the worker threads */
- if (osver.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS) {
- for (i = 0; i < nthreads; i++) {
- add_job(-1);
- }
- }
- else { /* Windows NT/2000 */
- /* Hack alert... Give the server a couple of seconds to receive
- * connections and drain AcceptEx completion contexts. We will
- * probably drop a few connections across a graceful restart, but
- * hopefully not many. This needs work...*/
- Sleep(2000);
-
- /* Tell the worker threads to exit. Any connections accepted on
- * the completion port from now will be dropped */
- for (i=0; i < nthreads; i++) {
- if (!PostQueuedCompletionStatus(AcceptExCompPort, 0, 999, NULL)) {
- ap_log_error(APLOG_MARK,APLOG_INFO, APR_SUCCESS, server_conf,
- "PostQueuedCompletionStatus failed");
- }
- }
- }
-
- /* Wait for the worker threads to die */
- end_time = time(NULL) + 180;
- while (nthreads) {
- rv = wait_for_many_objects(nthreads, child_handles, end_time - time(NULL));
- if (rv != WAIT_TIMEOUT) {
- rv = rv - WAIT_OBJECT_0;
- ap_assert((rv >= 0) && (rv < nthreads));
- cleanup_thread(child_handles, &nthreads, rv);
- continue;
- }
- break;
- }
- for (i = 0; i < nthreads; i++) {
- TerminateThread(child_handles[i], 1);
- CloseHandle(child_handles[i]);
- }
- ap_log_error(APLOG_MARK,APLOG_INFO, APR_SUCCESS, server_conf,
- "Child %d: All worker threads have ended.", my_pid);
-
- if (osver.dwPlatformId != VER_PLATFORM_WIN32_WINDOWS) {
- /* All the worker threads should have exited by now, which will
- * cause any outstanding I/O on the completion port to be aborted.
- * Drain the completion port of this aborted I/O/
- */
- drain_acceptex_complport(AcceptExCompPort, TRUE);
- }
-
- ap_log_error(APLOG_MARK,APLOG_INFO, APR_SUCCESS, server_conf,
- "Child %d: Releasing the start mutex", my_pid);
- ap_unlock(start_mutex);
-
- /* Still need to register cleanups for the sockets */
- CloseHandle(AcceptExCompPort);
- destroy_semaphore(allowed_globals.jobsemaphore);
- ap_destroy_lock(allowed_globals.jobmutex);
-
- ap_destroy_context(pchild);
-}
-
-/*
- * Spawn a child Apache process. The child process has the command line arguments from
- * argc and argv[], plus a -Z argument giving the name of an event. The child should
- * open and poll or wait on this event. When it is signalled, the child should die.
- * prefix is a prefix string for the event name.
- *
- * The child_num argument on entry contains a serial number for this child (used to create
- * a unique event name). On exit, this number will have been incremented by one, ready
- * for the next call.
- *
- * On exit, the value pointed to be *ev will contain the event created
- * to signal the new child process.
- *
- * The return value is the handle to the child process if successful, else -1. If -1 is
- * returned the error will already have been logged by ap_log_error().
- */
-
-/**********************************************************************
- * master_main - this is the parent (main) process. We create a
- * child process to do the work, then sit around waiting for either
- * the child to exit, or a restart or exit signal. If the child dies,
- * we just respawn a new one. If we have a shutdown or graceful restart,
- * tell the child to die when it is ready. If it is a non-graceful
- * restart, force the child to die immediately.
- **********************************************************************/
-
-#define MAX_PROCESSES 50 /* must be < MAX_WAIT_OBJECTS-1 */
-
-static void cleanup_process(HANDLE *handles, HANDLE *events, int position, int *processes)
-{
- int i;
- int handle = 0;
-
- CloseHandle(handles[position]);
- CloseHandle(events[position]);
-
- handle = (int)handles[position];
-
- for (i = position; i < (*processes)-1; i++) {
- handles[i] = handles[i + 1];
- events[i] = events[i + 1];
- }
- (*processes)--;
-}
-
-static int create_process(ap_context_t *p, HANDLE *handles, HANDLE *events, int *processes)
-{
-
- int rv;
- char buf[1024];
- char *pCommand;
- int i;
- STARTUPINFO si; /* Filled in prior to call to CreateProcess */
- PROCESS_INFORMATION pi; /* filled in on call to CreateProces */
-
- ap_listen_rec *lr;
- DWORD BytesWritten;
- HANDLE hPipeRead = NULL;
- HANDLE hPipeWrite = NULL;
- SECURITY_ATTRIBUTES sa = {0};
-
- sa.nLength = sizeof(sa);
- sa.bInheritHandle = TRUE;
- sa.lpSecurityDescriptor = NULL;
-
- /* Create the IOCompletionPort */
- if (AcceptExCompPort == NULL) {
- AcceptExCompPort = CreateIoCompletionPort(INVALID_HANDLE_VALUE,
- NULL,
- 0,
- 0); /* CONCURRENT ACTIVE THREADS */
- if (AcceptExCompPort == NULL) {
- ap_log_error(APLOG_MARK,APLOG_ERR, GetLastError(), server_conf,
- "Unable to create the AcceptExCompletionPort -- process will exit");
- return -1;
- }
- }
-
- /* Build the command line. Should look something like this:
- * C:/apache/bin/apache.exe -f ap_server_confname
- * First, get the path to the executable...
- */
- rv = GetModuleFileName(NULL, buf, sizeof(buf));
- if (rv == sizeof(buf)) {
- ap_log_error(APLOG_MARK, APLOG_CRIT, ERROR_BAD_PATHNAME, server_conf,
- "Parent: Path to Apache process too long");
- return -1;
- } else if (rv == 0) {
- ap_log_error(APLOG_MARK, APLOG_CRIT, GetLastError(), server_conf,
- "Parent: GetModuleFileName() returned NULL for current process.");
- return -1;
- }
-
- /* Build the command line */
- pCommand = ap_psprintf(p, "\"%s\"", buf);
- for (i = 1; i < server_conf->process->argc; i++) {
- pCommand = ap_pstrcat(p, pCommand, " \"", server_conf->process->argv[i], "\"", NULL);
- }
-
- /* Create a pipe to send socket info to the child */
- if (!CreatePipe(&hPipeRead, &hPipeWrite, &sa, 0)) {
- ap_log_error(APLOG_MARK, APLOG_CRIT, GetLastError(), server_conf,
- "Parent: Unable to create pipe to child process.\n");
- return -1;
- }
-
- SetEnvironmentVariable("AP_PARENT_PID",ap_psprintf(p,"%d",parent_pid));
-
- /* Give the read end of the pipe (hPipeRead) to the child as stdin. The
- * parent will write the socket data to the child on this pipe.
- */
- memset(&si, 0, sizeof(si));
- memset(&pi, 0, sizeof(pi));
- si.cb = sizeof(si);
- si.dwFlags = STARTF_USESHOWWINDOW | STARTF_USESTDHANDLES;
- si.wShowWindow = SW_HIDE;
- si.hStdInput = hPipeRead;
-
- if (!CreateProcess(NULL, pCommand, NULL, NULL,
- TRUE, /* Inherit handles */
- CREATE_SUSPENDED, /* Creation flags */
- NULL, /* Environment block */
- NULL,
- &si, &pi)) {
- ap_log_error(APLOG_MARK, APLOG_CRIT, GetLastError(), server_conf,
- "Parent: Not able to create the child process.");
- /*
- * We must close the handles to the new process and its main thread
- * to prevent handle and memory leaks.
- */
- CloseHandle(pi.hProcess);
- CloseHandle(pi.hThread);
- return -1;
- }
- else {
- HANDLE kill_event;
- LPWSAPROTOCOL_INFO lpWSAProtocolInfo;
- HANDLE hDupedCompPort;
-
- ap_log_error(APLOG_MARK, APLOG_INFO, APR_SUCCESS, server_conf,
- "Parent: Created child process %d", pi.dwProcessId);
-
- SetEnvironmentVariable("AP_PARENT_PID",NULL);
-
- /* Create the exit_event, apCchild_pid */
- sa.nLength = sizeof(sa);
- sa.bInheritHandle = TRUE;
- sa.lpSecurityDescriptor = NULL;
- kill_event = CreateEvent(&sa, TRUE, FALSE, ap_psprintf(pconf,"apC%d", pi.dwProcessId));
- if (!kill_event) {
- ap_log_error(APLOG_MARK, APLOG_CRIT, GetLastError(), server_conf,
- "Parent: Could not create exit event for child process");
- CloseHandle(pi.hProcess);
- CloseHandle(pi.hThread);
- return -1;
- }
-
- /* Assume the child process lives. Update the process and event tables */
- handles[*processes] = pi.hProcess;
- events[*processes] = kill_event;
- (*processes)++;
-
- /* We never store the thread's handle, so close it now. */
- ResumeThread(pi.hThread);
- CloseHandle(pi.hThread);
-
- /* Run the chain of open sockets. For each socket, duplicate it
- * for the target process then send the WSAPROTOCOL_INFO
- * (returned by dup socket) to the child */
- for (lr = ap_listeners; lr; lr = lr->next) {
- int nsd;
- lpWSAProtocolInfo = ap_pcalloc(p, sizeof(WSAPROTOCOL_INFO));
- ap_get_os_sock(&nsd,lr->sd);
- /* Associate the socket with the IOcompletion port */
- CreateIoCompletionPort((HANDLE) nsd, AcceptExCompPort, 0, 0);
- ap_log_error(APLOG_MARK, APLOG_NOERRNO | APLOG_INFO, APR_SUCCESS, server_conf,
- "Parent: Duplicating socket %d and sending it to child process %d", nsd, pi.dwProcessId);
- if (WSADuplicateSocket(nsd, pi.dwProcessId,
- lpWSAProtocolInfo) == SOCKET_ERROR) {
- ap_log_error(APLOG_MARK, APLOG_CRIT, h_errno, server_conf,
- "Parent: WSADuplicateSocket failed for socket %d.", lr->sd );
- return -1;
- }
-
- if (!WriteFile(hPipeWrite, lpWSAProtocolInfo, (DWORD) sizeof(WSAPROTOCOL_INFO),
- &BytesWritten,
- (LPOVERLAPPED) NULL)) {
- ap_log_error(APLOG_MARK, APLOG_CRIT, GetLastError(), server_conf,
- "Parent: Unable to write duplicated socket %d to the child.", lr->sd );
- return -1;
- }
- ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, APR_SUCCESS, server_conf,
- "Parent: BytesWritten = %d WSAProtocolInfo = %x20", BytesWritten, *lpWSAProtocolInfo);
- }
- /* Now, send the AcceptEx completion port to the child */
- if (!DuplicateHandle(GetCurrentProcess(), AcceptExCompPort,
- pi.hProcess, &hDupedCompPort, 0,
- TRUE, DUPLICATE_SAME_ACCESS)) {
- ap_log_error(APLOG_MARK, APLOG_CRIT, GetLastError(), server_conf,
- "Parent: Unable to duplicate AcceptEx completion port. Shutting down.");
- return -1;
- }
- WriteFile(hPipeWrite, &hDupedCompPort, (DWORD) sizeof(hDupedCompPort), &BytesWritten, (LPOVERLAPPED) NULL);
- }
-
- CloseHandle(hPipeRead);
- CloseHandle(hPipeWrite);
-
- return 0;
-}
-
-static int master_main(server_rec *s, HANDLE shutdown_event, HANDLE restart_event)
-{
- int remaining_children_to_start = ap_daemons_to_start;
- int i;
- int rv, cld;
- int child_num = 0;
- int restart_pending = 0;
- int shutdown_pending = 0;
- int current_live_processes = 0; /* number of child process we know about */
-
- HANDLE process_handles[MAX_PROCESSES];
- HANDLE process_kill_events[MAX_PROCESSES];
-
- setup_listeners(s);
-
- /* Create child process
- * Should only be one in this version of Apache for WIN32
- */
- service_set_status(SERVICE_START_PENDING);
- while (remaining_children_to_start--) {
- if (create_process(pconf, process_handles, process_kill_events,
- &current_live_processes) < 0) {
- ap_log_error(APLOG_MARK, APLOG_CRIT, GetLastError(), server_conf,
- "master_main: create child process failed. Exiting.");
- shutdown_pending = 1;
- goto die_now;
- }
- }
- service_set_status(SERVICE_RUNNING);
-
- restart_pending = shutdown_pending = 0;
-
- /* Wait for shutdown or restart events or for child death */
- process_handles[current_live_processes] = shutdown_event;
- process_handles[current_live_processes+1] = restart_event;
- printf("process/shutdown/restart %d %d %d\n", process_handles[0], process_handles[1], process_handles[2]);
- rv = WaitForMultipleObjects(current_live_processes+2, (HANDLE *)process_handles,
- FALSE, INFINITE);
- cld = rv - WAIT_OBJECT_0;
- if (rv == WAIT_FAILED) {
- /* Something serious is wrong */
- ap_log_error(APLOG_MARK,APLOG_CRIT, GetLastError(), server_conf,
- "master_main: WaitForMultipeObjects WAIT_FAILED -- doing server shutdown");
- shutdown_pending = 1;
- }
- else if (rv == WAIT_TIMEOUT) {
- /* Hey, this cannot happen */
- ap_log_error(APLOG_MARK, APLOG_ERR, GetLastError(), s,
- "master_main: WaitForMultipeObjects with INFINITE wait exited with WAIT_TIMEOUT");
- shutdown_pending = 1;
- }
- else if (cld == current_live_processes) {
- /* shutdown_event signalled */
- shutdown_pending = 1;
- printf("shutdown event signaled\n");
- ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, APR_SUCCESS, s,
- "master_main: Shutdown event signaled -- doing server shutdown.");
- if (ResetEvent(shutdown_event) == 0) {
- ap_log_error(APLOG_MARK, APLOG_ERR, GetLastError(), s,
- "ResetEvent(shutdown_event)");
- }
-
- }
- else if (cld == current_live_processes+1) {
- /* restart_event signalled */
- int children_to_kill = current_live_processes;
- restart_pending = 1;
- ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, APR_SUCCESS, s,
- "master_main: Restart event signaled. Doing a graceful restart.");
- if (ResetEvent(restart_event) == 0) {
- ap_log_error(APLOG_MARK, APLOG_ERR, GetLastError(), s,
- "master_main: ResetEvent(restart_event) failed.");
- }
- /* Signal each child process to die
- * We are making a big assumption here that the child process, once signaled,
- * will REALLY go away. Since this is a restart, we do not want to hold the
- * new child process up waiting for the old child to die. Remove the old
- * child out of the process_handles ap_table_t and hope for the best...
- */
- for (i = 0; i < children_to_kill; i++) {
- printf("SetEvent handle = %d\n", process_kill_events[i]);
- if (SetEvent(process_kill_events[i]) == 0)
- ap_log_error(APLOG_MARK, APLOG_ERR, GetLastError(), s,
- "master_main: SetEvent for child process in slot #%d failed", i);
- cleanup_process(process_handles, process_kill_events, i, &current_live_processes);
- }
- }
- else {
- /* A child process must have exited because of a fatal error condition (seg fault, etc.).
- * Remove the dead process
- * from the process_handles and process_kill_events ap_table_t and create a new
- * child process.
- * TODO: Consider restarting the child immediately without looping through http_main
- * and without rereading the configuration. Will need this if we ever support multiple
- * children. One option, create a parent thread which waits on child death and restarts it.
- */
- restart_pending = 1;
- ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, APR_SUCCESS, server_conf,
- "master_main: Child process failed. Restarting the child process.");
- ap_assert(cld < current_live_processes);
- cleanup_process(process_handles, process_kill_events, cld, &current_live_processes);
- /* APD2("main_process: child in slot %d died", rv); */
- /* restart_child(process_hancles, process_kill_events, cld, &current_live_processes); */
-
- /* Drain the AcceptEx completion port of any outstanding I/O pending for the dead
- * process. */
- drain_acceptex_complport(AcceptExCompPort, FALSE);
- }
-
-die_now:
- if (shutdown_pending) {
- int tmstart = time(NULL);
- /* Signal each child processes to die */
- for (i = 0; i < current_live_processes; i++) {
- printf("SetEvent handle = %d\n", process_kill_events[i]);
- if (SetEvent(process_kill_events[i]) == 0)
- ap_log_error(APLOG_MARK,APLOG_ERR, GetLastError(), server_conf,
- "master_main: SetEvent for child process in slot #%d failed", i);
- }
-
- while (current_live_processes && ((tmstart+60) > time(NULL))) {
- rv = WaitForMultipleObjects(current_live_processes, (HANDLE *)process_handles, FALSE, 2000);
- if (rv == WAIT_TIMEOUT)
- continue;
- ap_assert(rv != WAIT_FAILED);
- cld = rv - WAIT_OBJECT_0;
- ap_assert(rv < current_live_processes);
- cleanup_process(process_handles, process_kill_events, cld, &current_live_processes);
- }
- for (i = 0; i < current_live_processes; i++) {
- ap_log_error(APLOG_MARK,APLOG_ERR|APLOG_NOERRNO, APR_SUCCESS, server_conf,
- "forcing termination of child #%d (handle %d)", i, process_handles[i]);
- TerminateProcess((HANDLE) process_handles[i], 1);
- }
- return (0); /* Tell the caller we are shutting down */
- }
-
- return (1); /* Tell the caller we want a restart */
-}
-
-/*
- * winnt_pre_config() hook
- */
-static void winnt_pre_config(ap_context_t *pconf, ap_context_t *plog, ap_context_t *ptemp)
-{
- char *pid;
-
- one_process = !!getenv("ONE_PROCESS");
-
- osver.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
- GetVersionEx(&osver);
-
- /* AP_PARENT_PID is only valid in the child */
- pid = getenv("AP_PARENT_PID");
- if (pid) {
- /* This is the child */
- parent_pid = atoi(pid);
- my_pid = getpid();
- }
- else {
- /* This is the parent */
- parent_pid = my_pid = getpid();
-
- }
-
- ap_listen_pre_config();
- ap_daemons_to_start = DEFAULT_NUM_DAEMON;
- ap_threads_per_child = DEFAULT_START_THREAD;
- ap_pid_fname = DEFAULT_PIDLOG;
- max_requests_per_child = DEFAULT_MAX_REQUESTS_PER_CHILD;
-
- ap_cpystrn(ap_coredump_dir, ap_server_root, sizeof(ap_coredump_dir));
-
-}
-
-static void winnt_post_config(ap_context_t *pconf, ap_context_t *plog, ap_context_t *ptemp, server_rec* server_conf)
-{
- server_conf = server_conf;
-}
-
-API_EXPORT(int) ap_mpm_run(ap_context_t *_pconf, ap_context_t *plog, server_rec *s )
-{
-
- char* exit_event_name;
- static int restart = 0; /* Default is to not restart */
-// time_t tmstart;
- static HANDLE shutdown_event; /* used to signal shutdown to parent */
- static HANDLE restart_event; /* used to signal a restart to parent */
-
- pconf = _pconf;
- server_conf = s;
-
- if ((parent_pid != my_pid) || one_process) {
- /* Child process */
- ap_log_error(APLOG_MARK, APLOG_INFO, APR_SUCCESS, server_conf,
- "Child %d: Child process is running", my_pid);
- AMCSocketInitialize();
- exit_event_name = ap_psprintf(pconf, "apC%d", my_pid);
- setup_signal_names(ap_psprintf(pconf,"ap%d", parent_pid));
-
- if (one_process) {
- /* Create the IO CompletionPort */
- if (AcceptExCompPort == NULL) {
- AcceptExCompPort = CreateIoCompletionPort(INVALID_HANDLE_VALUE,
- NULL, 0, 0);
- if (AcceptExCompPort == NULL) {
- ap_log_error(APLOG_MARK,APLOG_ERR, GetLastError(), server_conf,
- "Unable to create the AcceptExCompletionPort -- process will exit");
- return -1;
- }
- }
- ap_create_lock(&start_mutex,APR_MUTEX, APR_CROSS_PROCESS,signal_name_prefix,pconf);
- exit_event = CreateEvent(NULL, TRUE, FALSE, exit_event_name);
- }
- else {
- ap_child_init_lock(&start_mutex, signal_name_prefix, pconf);
- exit_event = OpenEvent(EVENT_ALL_ACCESS, FALSE, exit_event_name);
- ap_log_error(APLOG_MARK, APLOG_INFO, APR_SUCCESS, server_conf,
- "Child %d: exit_event_name = %s", my_pid, exit_event_name);
- }
- ap_assert(start_mutex);
- ap_assert(exit_event);
-
- child_main();
-
- CloseHandle(exit_event);
- AMCSocketCleanup();
- restart = 0;
- }
- else {
- /* Parent process */
- PSECURITY_ATTRIBUTES sa = GetNullACL(); /* returns NULL if invalid (Win95?) */
-
- setup_signal_names(ap_psprintf(pconf,"ap%d", parent_pid));
- if (!restart) {
- ap_log_pid(pconf, ap_pid_fname);
-
- service_set_status(SERVICE_START_PENDING);
- AMCSocketInitialize();
-// setup_signal_names(ap_psprintf(pconf,"ap%d", parent_pid));
-
- /* Create shutdown event, apPID_shutdown, where PID is the parent
- * Apache process ID. Shutdown is signaled by 'apache -k shutdown'.
- */
- shutdown_event = CreateEvent(sa, FALSE, FALSE, signal_shutdown_name);
- if (!shutdown_event) {
- ap_log_error(APLOG_MARK, APLOG_EMERG, GetLastError(), s,
- "master_main: Cannot create shutdown event %s", signal_shutdown_name);
- CleanNullACL((void *)sa);
- exit(1);
- }
-
- /* Create restart event, apPID_restart, where PID is the parent
- * Apache process ID. Restart is signaled by 'apache -k restart'.
- */
-// restart_event = CreateEvent(sa, TRUE, FALSE, signal_restart_name);
- restart_event = CreateEvent(sa, FALSE, FALSE, signal_restart_name);
- if (!restart_event) {
- CloseHandle(shutdown_event);
- ap_log_error(APLOG_MARK, APLOG_EMERG, GetLastError(), s,
- "ap_run_mpm: Cannot create restart event %s", signal_restart_name);
- CleanNullACL((void *)sa);
- exit(1);
- }
- CleanNullACL((void *)sa);
-
- /* Create the start mutex, apPID, where PID is the parent Apache process ID.
- * Ths start mutex is used during a restart to prevent more than one
- * child process from entering the accept loop at once.
- */
-// ap_create_lock(&start_mutex,APR_MUTEX, APR_CROSS_PROCESS,signal_name_prefix,pconf);
- ap_create_lock(&start_mutex,APR_MUTEX, APR_CROSS_PROCESS,signal_name_prefix,s->process->pool);
- /* TODO: Add some code to detect failure */
- }
-
- /* Go to work... */
- restart = master_main(server_conf, shutdown_event, restart_event);
-
- if (!restart) {
- const char *pidfile = NULL;
- /* Shutting down. Clean up... */
- pidfile = ap_server_root_relative (pconf, ap_pid_fname);
- if ( pidfile != NULL && unlink(pidfile) == 0)
- ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO,APR_SUCCESS,
- server_conf, "removed PID file %s (pid=%ld)",
- pidfile, (long)getpid());
- ap_destroy_lock(start_mutex);
-
- CloseHandle(restart_event);
- CloseHandle(shutdown_event);
- AMCSocketCleanup();
-
- service_set_status(SERVICE_STOPPED);
- }
- }
- return !restart;
-}
-
-static void winnt_hooks(void)
-{
-// INIT_SIGLIST()
- one_process = 0;
- /* Configuration hooks implemented by http_config.c ... */
-}
-
-/*
- * Command processors
- */
-static const char *set_pidfile(cmd_parms *cmd, void *dummy, char *arg)
-{
- const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
- if (err != NULL) {
- return err;
- }
-
- if (cmd->server->is_virtual) {
- return "PidFile directive not allowed in <VirtualHost>";
- }
- ap_pid_fname = arg;
- return NULL;
-}
-
-static const char *set_threads_per_child (cmd_parms *cmd, void *dummy, char *arg)
-{
- const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
- if (err != NULL) {
- return err;
- }
-
- ap_threads_per_child = atoi(arg);
- if (ap_threads_per_child > HARD_THREAD_LIMIT) {
- ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL,
- "WARNING: ThreadsPerChild of %d exceeds compile time"
- " limit of %d threads,", ap_threads_per_child,
- HARD_THREAD_LIMIT);
- ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL,
- " lowering ThreadsPerChild to %d. To increase, please"
- " see the HARD_THREAD_LIMIT define in src/include/httpd.h.",
- HARD_THREAD_LIMIT);
- }
- else if (ap_threads_per_child < 1) {
- ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL,
- "WARNING: Require ThreadsPerChild > 0, setting to 1");
- ap_threads_per_child = 1;
- }
- return NULL;
-}
-
-
-static const char *set_max_requests(cmd_parms *cmd, void *dummy, char *arg)
-{
- const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
- if (err != NULL) {
- return err;
- }
-
- max_requests_per_child = atoi(arg);
-
- return NULL;
-}
-
-static const char *set_coredumpdir (cmd_parms *cmd, void *dummy, char *arg)
-{
- struct stat finfo;
- const char *fname;
- const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
- if (err != NULL) {
- return err;
- }
-
- fname = ap_server_root_relative(cmd->pool, arg);
- if ((stat(fname, &finfo) == -1) || !S_ISDIR(finfo.st_mode)) {
- return ap_pstrcat(cmd->pool, "CoreDumpDirectory ", fname,
- " does not exist or is not a directory", NULL);
- }
- ap_cpystrn(ap_coredump_dir, fname, sizeof(ap_coredump_dir));
- return NULL;
-}
-
-/* Stub functions until this MPM supports the connection status API */
-
-API_EXPORT(void) ap_update_connection_status(long conn_id, const char *key, \
- const char *value)
-{
- /* NOP */
-}
-
-API_EXPORT(void) ap_reset_connection_status(long conn_id)
-{
- /* NOP */
-}
-
-static const command_rec winnt_cmds[] = {
-LISTEN_COMMANDS
-{ "PidFile", set_pidfile, NULL, RSRC_CONF, TAKE1,
- "A file for logging the server process ID"},
-{ "ThreadsPerChild", set_threads_per_child, NULL, RSRC_CONF, TAKE1,
- "Number of threads each child creates" },
-{ "MaxRequestsPerChild", set_max_requests, NULL, RSRC_CONF, TAKE1,
- "Maximum number of requests a particular child serves before dying." },
-{ "CoreDumpDirectory", set_coredumpdir, NULL, RSRC_CONF, TAKE1,
- "The location of the directory Apache changes to before dumping core" },
-{ NULL }
-};
-
-module MODULE_VAR_EXPORT mpm_winnt_module = {
- MPM20_MODULE_STUFF,
- winnt_pre_config, /* hook run before configuration is read */
- NULL, /* create per-directory config structure */
- NULL, /* merge per-directory config structures */
- NULL, /* create per-server config structure */
- NULL, /* merge per-server config structures */
- winnt_cmds, /* command ap_table_t */
- NULL, /* handlers */
- winnt_hooks /* register_hooks */
-};
diff --git a/server/mpm/winnt/mpm_winnt.h b/server/mpm/winnt/mpm_winnt.h
deleted file mode 100644
index 937cbe65c3..0000000000
--- a/server/mpm/winnt/mpm_winnt.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/* ====================================================================
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 2000 The Apache Software Foundation. All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgment:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowledgment may appear in the software itself,
- * if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Apache" and "Apache Software Foundation" must
- * not be used to endorse or promote products derived from this
- * software without prior written permission. For written
- * permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- * nor may "Apache" appear in their name, without prior written
- * permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation. For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
- * Portions of this software are based upon public domain software
- * originally written at the National Center for Supercomputing Applications,
- * University of Illinois, Urbana-Champaign.
- */
-
-#ifndef APACHE_MPM_WINNT_H
-#define APACHE_MPM_WINNT_H
-
-extern int ap_threads_per_child;
-extern int ap_max_requests_per_child;
-extern int ap_extended_status;
-extern void clean_child_exit(int);
-
-
-typedef struct CompContext {
- OVERLAPPED Overlapped;
- SOCKET accept_socket;
- ap_socket_t *sock;
- ap_listen_rec *lr;
- BUFF *conn_io;
- char *recv_buf;
- int recv_buf_size;
- ap_context_t *ptrans;
- struct sockaddr *sa_server;
- int sa_server_len;
- struct sockaddr *sa_client;
- int sa_client_len;
-} COMP_CONTEXT, *PCOMP_CONTEXT;
-#endif /* APACHE_MPM_WINNT_H */
diff --git a/server/mpm/winnt/registry.c b/server/mpm/winnt/registry.c
deleted file mode 100644
index cfe0119c00..0000000000
--- a/server/mpm/winnt/registry.c
+++ /dev/null
@@ -1,555 +0,0 @@
-/* ====================================================================
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 2000 The Apache Software Foundation. All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgment:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowledgment may appear in the software itself,
- * if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Apache" and "Apache Software Foundation" must
- * not be used to endorse or promote products derived from this
- * software without prior written permission. For written
- * permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- * nor may "Apache" appear in their name, without prior written
- * permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation. For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
- * Portions of this software are based upon public domain software
- * originally written at the National Center for Supercomputing Applications,
- * University of Illinois, Urbana-Champaign.
- */
-
-/*
- * Functions to handle interacting with the Win32 registry
- */
-
-/*
- * Apache registry key structure
- *
- * Apache's registry information is stored in the HKEY_LOCAL_MACHINE
- * key, under
- *
- * HKLM\SOFTWARE\Apache Software Foundation\Apache\version
- *
- * These keys are defined in this file. The definition of the "version" part
- * will need updating each time Apache moves from beta to non-beta or from a
- * release to a development or beta version.
- */
-
-/* To allow for multiple services, store the configuration file's full path
- * under each service entry:
- *
- * HKLM\System\CurrentControlSet\Services\[service name]\Parameters\ConfPath
- *
- * The default configuration path (for console apache) is still stored:
- *
- * HKLM\Software\[Vendor]\[Software]\[Version]\ServerRoot
- */
-#include "os.h"
-//#include <windows.h>
-//#include <stdio.h>
-
-#include "httpd.h"
-#include "http_log.h"
-
-/* Define where the Apache values are stored in the registry. In general
- * VERSION will be the same across all beta releases for a particular
- * major release, but will change when the final release is made.
- */
-
-#define VENDOR "Apache Software Foundation"
-#define SOFTWARE "Apache"
-#define VERSION "2.0a2"
-
-#define REGKEY "SOFTWARE\\" VENDOR "\\" SOFTWARE "\\" VERSION
-
-#define SERVICEKEYPRE "System\\CurrentControlSet\\Services\\"
-#define SERVICEKEYPOST "\\Parameters"
-
-/*
- * The Windows API registry key functions don't set the last error
- * value (the windows equivalent of errno). So we need to set it
- * with SetLastError() before calling the aplog_error() function.
- * Because this is common, let's have a macro.
- */
-#define do_error(rv,fmt,arg) do { \
- ap_log_error(APLOG_MARK, APLOG_ERR, rv, NULL, fmt, arg); \
- } while (0);
-
-/*
- * Get the data for registry key value. This is a generic function that
- * can either get a value into a caller-supplied buffer, or it can
- * allocate space for the value from the pass in pool. It will normally
- * be used by other functions within this file to get specific key values
- * (e.g. registry_get_server_root()). This function returns a number of
- * different error statuses, allowing the caller to differentiate
- * between a key or value not existing and other kinds of errors. Depending
- * on the type of data being obtained the caller can then either ignore
- * the key-not-existing error, or treat it as a real error.
- *
- * If ppValue is NULL, allocate space for the value and return it in
- * *pValue. The return value is the number of bytes in the value.
- * The first argument is the ap_context_t to use to allocate space for the value.
- *
- * If pValue is not NULL, assume it is a buffer of nSizeValue bytes,
- * and write the value into the buffer. The return value is the number
- * of bytes in the value (so if the return value is greater than
- * the supplied nSizeValue, the caller knows that *pValue is truncated).
- * The ap_context_t argument is ignored.
- *
- * The return value is the number of bytes in the successfully retreived
- * key if everything worked, or:
- *
- * -1 the key does not exists
- * -2 if out of memory during the function
- * -3 if the buffer specified by *pValue/nSizeValue was not large enough
- * for the value.
- * -4 if an error occurred
- *
- * If the return value is negative a message will be logged to the error
- * log (aplog_error) function. If the return value is -2, -3 or -4 the message
- * will be logged at priority "error", while if the return value is -1 the
- * message will be logged at priority "warning".
- */
-
-static int ap_registry_get_key_int(ap_context_t *p, char *key, char *name, char *pBuffer, int nSizeBuffer, char **ppValue)
-{
- long rv;
- HKEY hKey;
- char *pValue;
- int nSize;
- int retval;
-
- rv = RegOpenKeyEx(HKEY_LOCAL_MACHINE,
- key,
- 0,
- KEY_READ,
- &hKey);
-
- if (rv == ERROR_FILE_NOT_FOUND) {
- ap_log_error(APLOG_MARK,APLOG_WARNING|APLOG_NOERRNO,rv,NULL,
- "Registry does not contain key %s",key);
- return -1;
- }
- if (rv != ERROR_SUCCESS) {
- do_error(rv, "RegOpenKeyEx HKLM\\%s",key);
- return -4;
- }
-
- if (pBuffer == NULL) {
- /* Find the size required for the data by passing NULL as the buffer
- * pointer. On return nSize will contain the size required for the
- * buffer if the return value is ERROR_SUCCESS.
- */
- rv = RegQueryValueEx(hKey,
- name, /* key name */
- NULL, /* reserved */
- NULL, /* type */
- NULL, /* for value */
- &nSize); /* for size of "value" */
-
- if (rv != ERROR_SUCCESS) {
- do_error(rv, "RegQueryValueEx(key %s)", key);
- return -1;
- }
-
- pValue = ap_palloc(p, nSize);
- *ppValue = pValue;
- if (!pValue) {
- /* Eek, out of memory, probably not worth trying to carry on,
- * but let's give it a go
- */
- ap_log_error(APLOG_MARK,APLOG_ERR|APLOG_NOERRNO,APR_ENOMEM,NULL,
- "Error getting registry key: out of memory");
- return -2;
- }
- }
- else {
- /* Get the value into the existing buffer of length nSizeBuffer */
- pValue = pBuffer;
- nSize = nSizeBuffer;
- }
-
- rv = RegQueryValueEx(hKey,
- name, /* key name */
- NULL, /* reserved */
- NULL, /* type */
- pValue, /* for value */
- &nSize); /* for size of "value" */
-
- retval = 0; /* Return value */
-
- if (rv == ERROR_FILE_NOT_FOUND) {
- ap_log_error(APLOG_MARK,APLOG_WARNING|APLOG_NOERRNO,rv,NULL,
- "Registry does not contain value %s\\%s", key, name);
- retval = -1;
- }
- else if (rv == ERROR_MORE_DATA) {
- /* This should only happen if we got passed a pre-existing buffer
- * (pBuffer, nSizeBuffer). But I suppose it could also happen if we
- * allocate a buffer if another process changed the length of the
- * value since we found out its length above. Umm.
- */
- ap_log_error(APLOG_MARK,APLOG_ERR|APLOG_NOERRNO,rv,NULL,
- "Error getting registry value %s: buffer not big enough", key);
- retval = -3;
- }
- else if (rv != ERROR_SUCCESS) {
- do_error(rv, "RegQueryValueEx(key %s)", key);
- retval = -4;
- }
-
- rv = RegCloseKey(hKey);
- if (rv != ERROR_SUCCESS) {
- do_error(rv, "RegCloseKey HKLM\\%s", key);
- if (retval == 0) {
- /* Keep error status from RegQueryValueEx, if any */
- retval = -4;
- }
- }
-
- return retval < 0 ? retval : nSize;
-}
-
-/*
- * Get the server root from the registry into 'dir' which is
- * size bytes long. Returns 0 if the server root was found
- * or if the serverroot key does not exist (in which case
- * dir will contain an empty string), or -1 if there was
- * an error getting the key.
- */
-#if 0
-int ap_registry_get_server_root(ap_context_t *p, char *dir, int size)
-{
- int rv;
-
- rv = ap_registry_get_key_int(p, REGKEY, "ServerRoot", dir, size, NULL);
- if (rv < 0) {
- dir[0] = '\0';
- }
-
- return (rv < -1) ? -1 : 0;
-}
-#else
-int ap_registry_get_server_root(ap_context_t *p, char **buf)
-{
- int rv;
-
- rv = ap_registry_get_key_int(p, REGKEY, "ServerRoot", NULL, 0, buf);
- if (rv < 0) {
- *buf = NULL;
- }
-
- return (rv < -1) ? -1 : 0;
-}
-#endif
-char *ap_get_service_key(char *service_name)
-{
- char *key = malloc(strlen(SERVICEKEYPRE) +
- strlen(service_name) +
- strlen(SERVICEKEYPOST) + 1);
-
- sprintf(key,"%s%s%s", SERVICEKEYPRE, service_name, SERVICEKEYPOST);
-
- return(key);
-}
-#if 0
-int ap_registry_get_service_conf(ap_context_t *p, char *dir, int size, char *service_name)
-{
- int rv;
- char *key = ap_get_service_key(service_name);
-
- rv = ap_registry_get_key_int(p, key, "ConfPath", dir, size, NULL);
- if (rv < 0) {
- dir[0] = '\0';
- }
-
- free(key);
- return (rv < -1) ? -1 : 0;
-}
-#else
-int ap_registry_get_service_conf(ap_context_t *p, char **buf, char *service_name)
-{
- int rv;
- char *key = ap_get_service_key(service_name);
-
- rv = ap_registry_get_key_int(p, key, "ConfPath", NULL, 0, buf);
- if (rv < 0) {
- *buf = NULL;
- }
-
- free(key);
- return (rv < -1) ? -1 : 0;
-}
-#endif
-
-/**********************************************************************
- * The rest of this file deals with storing keys or values in the registry
- */
-
-char *ap_registry_parse_key(int index, char *key)
-{
- char *head = key, *skey;
- int i;
-
- if(!key)
- return(NULL);
-
- for(i = 0; i <= index; i++)
- {
- if(key && key[0] == '\\')
- key++;
- if (!key)
- return(NULL);
- head = key;
- key = strchr(head, '\\');
- }
-
- if(!key)
- return(strdup(head));
- *key = '\0';
- skey = strdup(head);
- *key = '\\';
- return(skey);
-}
-
-/*
- * ap_registry_create_apache_key() creates the Apache registry key
- * (HLKM\SOFTWARE\Apache Software Foundation\Apache\version, as defined at the start
- * of this file), if it does not already exist. It will be called by
- * ap_registry_store_key_int() if it cannot open this key. This
- * function is intended to be called by ap_registry_store_key_int() if
- * the Apache key does not exist when it comes to store a data item.
- *
- * Returns 0 on success or -1 on error. If -1 is returned, the error will
- * already have been logged.
- */
-
-static int ap_registry_create_key(char *longkey)
-{
- int index;
- HKEY hKey;
- HKEY hKeyNext;
- int retval;
- int rv;
- char *key;
-
- hKey = HKEY_LOCAL_MACHINE;
- index = 0;
- retval = 0;
-
- /* Walk the tree, creating at each stage if necessary */
- while (key=ap_registry_parse_key(index,longkey)) {
- int result;
-
- rv = RegCreateKeyEx(hKey,
- key, /* subkey */
- 0, /* reserved */
- NULL, /* class */
- REG_OPTION_NON_VOLATILE,
- KEY_WRITE,
- NULL,
- &hKeyNext,
- &result);
- if (rv != ERROR_SUCCESS) {
- do_error(rv, "RegCreateKeyEx(%s)", longkey);
- retval = -4;
- }
-
- /* Close the old key */
- rv = RegCloseKey(hKey);
- if (rv != ERROR_SUCCESS) {
- do_error(rv, "RegCloseKey", NULL);
- if (retval == 0) {
- /* Keep error status from RegCreateKeyEx, if any */
- retval = -4;
- }
- }
-
- if (retval) {
- break;
- }
-
- free(key);
- hKey = hKeyNext;
- index++;
- }
-
- if (!key) {
- /* Close the final key we opened, if we walked the entire
- * tree
- */
- rv = RegCloseKey(hKey);
- if (rv != ERROR_SUCCESS) {
- do_error(rv, "RegCloseKey", NULL);
- if (retval == 0) {
- /* Keep error status from RegCreateKeyEx, if any */
- retval = -4;
- }
- }
- }
- else
- free(key);
-
- return retval;
-}
-
-/*
- * ap_registry_store_key_int() stores a value name and value under the
- * Apache registry key. If the Apache key does not exist it is created
- * first. This function is intended to be called from a wrapper function
- * in this file to set particular data values, such as
- * ap_registry_set_server_root() below.
- *
- * Returns 0 if the value name and data was stored successfully, or
- * returns -1 if the Apache key does not exist (since we try to create
- * this key, this should never happen), or -4 if any other error occurred
- * (these values are consistent with ap_registry_get_key_int()).
- * If the return value is negative then the error will already have been
- * logged via aplog_error().
- */
-
-static int ap_registry_store_key_int(char *key, char *name, DWORD type, void *value, int value_size)
-{
- long rv;
- HKEY hKey;
- int retval;
-
- rv = RegOpenKeyEx(HKEY_LOCAL_MACHINE,
- key,
- 0,
- KEY_WRITE,
- &hKey);
-
- if (rv == ERROR_FILE_NOT_FOUND) {
- /* Key could not be opened -- try to create it
- */
- if (ap_registry_create_key(key) < 0) {
- /* Creation failed (error already reported) */
- return -4;
- }
-
- /* Now it has been created we should be able to open it
- */
- rv = RegOpenKeyEx(HKEY_LOCAL_MACHINE,
- key,
- 0,
- KEY_WRITE,
- &hKey);
-
- if (rv == ERROR_FILE_NOT_FOUND) {
- ap_log_error(APLOG_MARK,APLOG_WARNING|APLOG_NOERRNO,rv,NULL,
- "Registry does not contain key %s after creation",key);
- return -1;
- }
- }
-
- if (rv != ERROR_SUCCESS) {
- do_error(rv, "RegOpenKeyEx HKLM\\%s", key);
- return -4;
- }
-
- /* Now set the value and data */
- rv = RegSetValueEx(hKey,
- name, /* value key name */
- 0, /* reserved */
- type, /* type */
- value, /* value data */
- (DWORD)value_size); /* for size of "value" */
-
- retval = 0; /* Return value */
-
- if (rv != ERROR_SUCCESS) {
- do_error(rv, "RegQueryValueEx(key %s)", key);
- retval = -4;
- }
- else {
- ap_log_error(APLOG_MARK,APLOG_INFO|APLOG_NOERRNO,rv,NULL,
- "Registry stored HKLM\\" REGKEY "\\%s value %s", key,
- type == REG_SZ ? value : "(not displayable)");
- }
-
- /* Make sure we close the key even if there was an error storing
- * the data
- */
- rv = RegCloseKey(hKey);
- if (rv != ERROR_SUCCESS) {
- do_error(rv, "RegCloseKey HKLM\\%s", key);
- if (retval == 0) {
- /* Keep error status from RegQueryValueEx, if any */
- retval = -4;
- }
- }
-
- return retval;
-}
-
-/*
- * Sets the service confpath value within the registry. Returns 0 on success
- * or -1 on error. If -1 is return the error will already have been
- * logged via aplog_error().
- */
-
-int ap_registry_set_service_conf(char *conf, char *service_name)
-{
- int rv;
- char *key = ap_get_service_key(service_name);
-
- rv = ap_registry_store_key_int(key, "ConfPath", REG_SZ, conf, strlen(conf)+1);
- free(key);
-
- return rv < 0 ? -1: 0;
-}
-
-/*
- * Sets the serverroot value within the registry. Returns 0 on success
- * or -1 on error. If -1 is return the error will already have been
- * logged via aplog_error().
- */
-
-int ap_registry_set_server_root(char *dir)
-{
- int rv;
-
- rv = ap_registry_store_key_int(REGKEY, "ServerRoot", REG_SZ, dir, strlen(dir)+1);
-
- return rv < 0 ? -1 : 0;
-}
-
diff --git a/server/mpm/winnt/service.c b/server/mpm/winnt/service.c
deleted file mode 100644
index 6f53312c60..0000000000
--- a/server/mpm/winnt/service.c
+++ /dev/null
@@ -1,524 +0,0 @@
-/* ====================================================================
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 2000 The Apache Software Foundation. All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgment:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowledgment may appear in the software itself,
- * if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Apache" and "Apache Software Foundation" must
- * not be used to endorse or promote products derived from this
- * software without prior written permission. For written
- * permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- * nor may "Apache" appear in their name, without prior written
- * permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation. For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
- * Portions of this software are based upon public domain software
- * originally written at the National Center for Supercomputing Applications,
- * University of Illinois, Urbana-Champaign.
- */
-
-#ifdef WIN32
-
-#include "os.h"
-#include <stdlib.h>
-#include <direct.h>
-
-#define CORE_PRIVATE
-#include "httpd.h"
-#include "http_conf_globals.h"
-#include "http_log.h"
-#include "http_main.h"
-#include "service.h"
-#include "registry.h"
-
-static struct
-{
- int (*main_fn)(int, char **);
- event *stop_event;
- int connected;
- SERVICE_STATUS_HANDLE hServiceStatus;
- char *name;
- int exit_status;
- SERVICE_STATUS ssStatus;
- FILE *logFile;
- char *service_dir;
-} globdat;
-
-static void WINAPI service_main_fn(DWORD, LPTSTR *);
-static void WINAPI service_ctrl(DWORD ctrlCode);
-static int ReportStatusToSCMgr(int currentState, int exitCode, int waitHint);
-static int ap_start_service(SC_HANDLE);
-static int ap_stop_service(SC_HANDLE);
-
-int service_main(int (*main_fn)(int, char **), int argc, char **argv )
-{
- SERVICE_TABLE_ENTRY dispatchTable[] =
- {
- { "", service_main_fn },
- { NULL, NULL }
- };
-
- globdat.main_fn = main_fn;
- globdat.stop_event = CreateEvent(NULL, 0, 0, "apache-signal");
- globdat.connected = 1;
- globdat.service_dir = argv[0];
-
- if(!StartServiceCtrlDispatcher(dispatchTable))
- {
- /* This is a genuine failure of the SCM. */
- ap_log_error(APLOG_MARK, APLOG_ERR, GetLastError(), NULL,
- "Error starting service control dispatcher");
- return(globdat.exit_status);
- }
- else
- {
- return(globdat.exit_status);
- }
-}
-
-void service_cd()
-{
- /* change to the drive with the executable */
- char buf[300];
- GetModuleFileName(NULL, buf, 300);
- buf[2] = 0;
- chdir(buf);
-}
-
-void __stdcall service_main_fn(DWORD argc, LPTSTR *argv)
-{
- int i, new_argc;
- char **new, *server_root, *tmp;
- char *server_confname = SERVER_CONFIG_FILE;
- ap_array_header_t *cmdtbl;
- ap_context_t *pwincmd;
-
- ap_create_context(&pwincmd, NULL);
- if (pwincmd == NULL) {
- exit(0);
- }
-
- ap_server_argv0 = globdat.name = argv[0];
- cmdtbl = ap_make_array(pwincmd, 1, sizeof(char *));
-
- server_root = ap_pstrdup(pwincmd, globdat.service_dir);
- tmp = strrchr(server_root, '\\');
- *tmp = '\0';
-
- if(!(globdat.hServiceStatus = RegisterServiceCtrlHandler( globdat.name, service_ctrl)))
- {
- ap_log_error(APLOG_MARK, APLOG_ERR, GetLastError(), NULL,
- "Failure registering service handler");
- return;
- }
-
- ReportStatusToSCMgr(
- SERVICE_START_PENDING, // service state
- NO_ERROR, // exit code
- 3000); // wait hint
-
- service_cd();
-
- /* Fetch server_conf from the registry
- * Rebuild argv and argc adding the -d server_root and -f server_conf then
- * call apache_main
- */
- ap_registry_get_service_conf(pwincmd, &server_confname, argv[0]);
- for (i = 0; i < argc ; i++) {
- new = (char **) ap_push_array(cmdtbl);
- *new = argv[i];
- }
- /* Add server_confname to the argument list */
- new = (char **) ap_push_array(cmdtbl);
- *new = "-f";
- new = (char **) ap_push_array(cmdtbl);
- *new = server_confname;
- new = (char **) ap_push_array(cmdtbl);
- *new = "-d";
- new = (char **) ap_push_array(cmdtbl);
- *new = server_root;
- new_argc = argc + 4;
-
- globdat.exit_status = (*globdat.main_fn)( new_argc, (char**) cmdtbl->elts );
-
- ReportStatusToSCMgr(SERVICE_STOPPED, NO_ERROR, 0);
-
- return;
-}
-
-void service_set_status(int status)
-{
- ReportStatusToSCMgr(status, NO_ERROR, 3000);
-}
-
-
-
-//
-// FUNCTION: service_ctrl
-//
-// PURPOSE: This function is called by the SCM whenever
-// ControlService() is called on this service.
-//
-// PARAMETERS:
-// dwCtrlCode - type of control requested
-//
-// RETURN VALUE:
-// none
-//
-// COMMENTS:
-//
-VOID WINAPI service_ctrl(DWORD dwCtrlCode)
-{
- int state;
-
-
- state = globdat.ssStatus.dwCurrentState;
- switch(dwCtrlCode)
- {
- // Stop the service.
- //
- case SERVICE_CONTROL_STOP:
- state = SERVICE_STOP_PENDING;
- ap_start_shutdown();
- break;
-
- // Update the service status.
- //
- case SERVICE_CONTROL_INTERROGATE:
- break;
-
- // invalid control code
- //
- default:
- break;
-
- }
-
- ReportStatusToSCMgr(state, NO_ERROR, 0);
-}
-
-
-int ReportStatusToSCMgr(int currentState, int exitCode, int waitHint)
-{
- static int firstTime = 1;
- static int checkPoint = 1;
- int rv;
-
- if(firstTime)
- {
- firstTime = 0;
- globdat.ssStatus.dwServiceType = SERVICE_WIN32_OWN_PROCESS;
- globdat.ssStatus.dwServiceSpecificExitCode = 0;
- globdat.ssStatus.dwCheckPoint = 1;
- }
-
- if(globdat.connected)
- {
- if (currentState == SERVICE_START_PENDING)
- globdat.ssStatus.dwControlsAccepted = 0;
- else
- globdat.ssStatus.dwControlsAccepted = SERVICE_ACCEPT_STOP;
-
- globdat.ssStatus.dwCurrentState = currentState;
- globdat.ssStatus.dwWin32ExitCode = exitCode;
- if(waitHint)
- globdat.ssStatus.dwWaitHint = waitHint;
-
- if ( ( currentState == SERVICE_RUNNING ) ||
- ( currentState == SERVICE_STOPPED ) )
- {
- globdat.ssStatus.dwWaitHint = 0;
- globdat.ssStatus.dwCheckPoint = 0;
- }
- else
- globdat.ssStatus.dwCheckPoint = ++checkPoint;
-
- rv = SetServiceStatus(globdat.hServiceStatus, &globdat.ssStatus);
-
- }
- return(1);
-}
-
-void InstallService(char *service_name, char *conf)
-{
- SC_HANDLE schService;
- SC_HANDLE schSCManager;
-
- TCHAR szPath[512];
- TCHAR szQuotedPath[512];
-
- printf("Installing the %s service to use %s\n", service_name, conf);
-
- if (GetModuleFileName( NULL, szPath, 512 ) == 0)
- {
- ap_log_error(APLOG_MARK, APLOG_ERR, GetLastError(), NULL,
- "GetModuleFileName failed");
- return;
- }
-
- ap_snprintf(szQuotedPath, 512, "\"%s\"", szPath);
-
- schSCManager = OpenSCManager(
- NULL, // machine (NULL == local)
- NULL, // database (NULL == default)
- SC_MANAGER_ALL_ACCESS // access required
- );
- if (!schSCManager) {
- ap_log_error(APLOG_MARK, APLOG_ERR, GetLastError(), NULL,
- "OpenSCManager failed");
- }
- else {
- schService = CreateService(
- schSCManager, // SCManager database
- service_name, // name of service
- service_name, // name to display
- SERVICE_ALL_ACCESS, // desired access
- SERVICE_WIN32_OWN_PROCESS, // service type
- SERVICE_AUTO_START, // start type
- SERVICE_ERROR_NORMAL, // error control type
- szQuotedPath, // service's binary
- NULL, // no load ordering group
- NULL, // no tag identifier
- NULL, // dependencies
- NULL, // LocalSystem account
- NULL); // no password
-
- if (schService) {
- CloseServiceHandle(schService);
-
- /* Now store the server_root in the registry */
- if(!ap_registry_set_service_conf(conf, service_name))
- printf("The %s service has been installed successfully.\n", service_name );
- }
- else {
- ap_log_error(APLOG_MARK, APLOG_ERR, GetLastError(), NULL,
- "CreateService failed");
- }
-
- CloseServiceHandle(schSCManager);
- }
-}
-
-
-void RemoveService(char *service_name)
-{
- SC_HANDLE schService;
- SC_HANDLE schSCManager;
-
- printf("Removing the %s service\n", service_name);
-
- schSCManager = OpenSCManager(
- NULL, // machine (NULL == local)
- NULL, // database (NULL == default)
- SC_MANAGER_ALL_ACCESS // access required
- );
- if (!schSCManager) {
- ap_log_error(APLOG_MARK, APLOG_ERR, GetLastError(), NULL,
- "OpenSCManager failed");
- }
- else {
- schService = OpenService(schSCManager, service_name, SERVICE_ALL_ACCESS);
-
- if (schService == NULL) {
- /* Could not open the service */
- ap_log_error(APLOG_MARK, APLOG_ERR, GetLastError(), NULL,
- "OpenService failed");
- }
- else {
- /* try to stop the service */
- ap_stop_service(schService);
-
- // now remove the service
- if (DeleteService(schService) == 0)
- ap_log_error(APLOG_MARK, APLOG_ERR, GetLastError(), NULL,
- "DeleteService failed");
- else
- printf("The %s service has been removed successfully.\n", service_name );
- CloseServiceHandle(schService);
- }
- /* SCM removes registry parameters */
- CloseServiceHandle(schSCManager);
- }
-
-}
-
-/* A hack to determine if we're running as a service without waiting for
- * the SCM to fail; if AllocConsole succeeds, we're a service.
- */
-
-BOOL isProcessService() {
- if( !AllocConsole() )
- return FALSE;
- FreeConsole();
- return TRUE;
-}
-
-/* Determine is service_name is a valid service
- */
-
-BOOL isValidService(char *service_name) {
- SC_HANDLE schSCM, schSVC;
- int Err;
-
- if (!(schSCM = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS))) {
- ap_log_error(APLOG_MARK, APLOG_ERR, GetLastError(), NULL,
- "OpenSCManager failed");
- return FALSE;
- }
-
- if ((schSVC = OpenService(schSCM, service_name, SERVICE_ALL_ACCESS))) {
- CloseServiceHandle(schSVC);
- CloseServiceHandle(schSCM);
- return TRUE;
- }
-
- Err = GetLastError();
- if (Err != ERROR_SERVICE_DOES_NOT_EXIST && Err != ERROR_INVALID_NAME)
- ap_log_error(APLOG_MARK, APLOG_ERR, Err, NULL,
- "OpenService failed");
-
- return FALSE;
-}
-
-int send_signal_to_service(char *service_name, char *sig) {
- SC_HANDLE schService;
- SC_HANDLE schSCManager;
- int success = FALSE;
-
- enum { start, restart, stop, unknown } action;
- static char *param[] = { "start", "restart", "shutdown" };
- static char *participle[] = { "starting", "restarting", "stopping" };
- static char *past[] = { "started", "restarted", "stopped" };
-
- for (action = start; action < unknown; action++)
- if (!strcasecmp(sig, param[action]))
- break;
-
- if (action == unknown) {
- printf("signal must be start, restart, or shutdown\n");
- return FALSE;
- }
-
- schSCManager = OpenSCManager(
- NULL, // machine (NULL == local)
- NULL, // database (NULL == default)
- SC_MANAGER_ALL_ACCESS // access required
- );
- if (!schSCManager) {
- ap_log_error(APLOG_MARK, APLOG_ERR, GetLastError(), NULL,
- "OpenSCManager failed");
- }
- else {
- schService = OpenService(schSCManager, service_name, SERVICE_ALL_ACCESS);
-
- if (schService == NULL) {
- /* Could not open the service */
- ap_log_error(APLOG_MARK, APLOG_ERR, GetLastError(), NULL,
- "OpenService failed");
- }
- else {
- if (!QueryServiceStatus(schService, &globdat.ssStatus))
- ap_log_error(APLOG_MARK, APLOG_ERR, GetLastError(), NULL,
- "QueryService failed");
- else {
- if (globdat.ssStatus.dwCurrentState == SERVICE_STOPPED && action == stop)
- printf("The %s service is not started.\n", service_name);
- else if (globdat.ssStatus.dwCurrentState == SERVICE_RUNNING && action == start)
- printf("The %s service has already been started.\n", service_name);
- else {
- printf("The %s service is %s.\n", service_name, participle[action]);
-
- if (action == stop || action == restart)
- success = ap_stop_service(schService);
- if (action == start || action == restart)
- success = ap_start_service(schService);
-
- if( success )
- printf("The %s service has %s.\n", service_name, past[action]);
- else
- printf("Failed to %s the %s service.\n", sig, service_name );
- }
-
- CloseServiceHandle(schService);
- }
- }
- /* SCM removes registry parameters */
- CloseServiceHandle(schSCManager);
- }
- return success;
-}
-
-int ap_stop_service(SC_HANDLE schService)
-{
- if (ControlService(schService, SERVICE_CONTROL_STOP, &globdat.ssStatus)) {
- Sleep(1000);
- while (QueryServiceStatus(schService, &globdat.ssStatus)) {
- if (globdat.ssStatus.dwCurrentState == SERVICE_STOP_PENDING)
- Sleep(1000);
- else
- break;
- }
- }
- if (QueryServiceStatus(schService, &globdat.ssStatus))
- if (globdat.ssStatus.dwCurrentState == SERVICE_STOPPED)
- return TRUE;
- return FALSE;
-}
-
-int ap_start_service(SC_HANDLE schService) {
- if (StartService(schService, 0, NULL)) {
- Sleep(1000);
- while(QueryServiceStatus(schService, &globdat.ssStatus)) {
- if(globdat.ssStatus.dwCurrentState == SERVICE_START_PENDING)
- Sleep(1000);
- else
- break;
- }
- }
- if (QueryServiceStatus(schService, &globdat.ssStatus))
- if (globdat.ssStatus.dwCurrentState == SERVICE_RUNNING)
- return TRUE;
- return FALSE;
-}
-
-#endif /* WIN32 */
-