Mailing List Archive

cvs commit: apache-1.3/htdocs/manual windows.html
pcs 98/05/10 09:12:10

Modified: htdocs/manual windows.html
Log:
Update windows instructions for 1.3b6. Move compilation stuff to the end
on the basis that most users will be interested in the pre-compiled
installer. Document the registry key used and how it relates to
command line arguments (-d, -f) and the ServerRoot directive. Show how
to start and stop the Apache service from the command line.

Revision Changes Path
1.14 +230 -93 apache-1.3/htdocs/manual/windows.html

Index: windows.html
===================================================================
RCS file: /export/home/cvs/apache-1.3/htdocs/manual/windows.html,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- windows.html 1998/03/30 02:40:15 1.13
+++ windows.html 1998/05/10 16:12:09 1.14
@@ -16,8 +16,8 @@

<H1 ALIGN="CENTER">Using Apache With Microsoft Windows</H1>

-<P>This document explains how to compile, install, configure and run
- Apache 1.3b3 (or later) under Microsoft Windows. Please note that at
+<P>This document explains how to install, configure and run
+ Apache 1.3b6 (or later) under Microsoft Windows. Please note that at
this time, Windows 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
@@ -31,131 +31,165 @@
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 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="#comp">Compiling Apache for Windows</A>
- <LI><A HREF="#inst">Installing 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="#comp">Compiling Apache for Windows</A>
</UL>

<HR>

<H2><A name="req">Requirements</A></H2>

-<P>Apache 1.3b3 requires the following:</P>
+<P>Apache 1.3b6 requires the following:</P>

<UL>
<LI>Microsoft Windows NT 4.0<A HREF="#351">*</A>, or Windows 95.
<LI>An Intel-based PC-compatible capable of running above OS (exact
requirements unknown) with a connection to a TCP/IP network.
- <LI>Microsoft Visual C++ 5.0 or later.
</UL>

<P><SMALL><A name="351">*</A> Apache may run with Windows NT 3.5.1, but
has not been tested.</SMALL></P>

-<P>This documentation assumes good working knowledge of Microsoft
- Windows, Microsoft Visual C++, and the Apache web server (for
- Unix).</P>
-
<P>If running on Windows 95, using the "Winsock2" upgrade is recommended
but may not be necessary. 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
+<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 release,
together with details of mirror web and anonymous ftp sites.</P>

-<P>You can download Apache 1.3b3 in two different forms: an InstallShield-based
- <CODE>.exe</CODE> file which contains the precompiled binary, and a
- <CODE>.tar.gz</CODE> which contains the source code (and is also the
- regular Unix distribution).
+<P>

-<H2><A name="comp">Compiling Apache for Windows</A></H2>
+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.

-<P>Compiling Apache requires Microsoft Visual C++ 5.0 to be properly
- installed. It is easiest to compile with the command-line tools
- (nmake, etc...). Consult the VC++ manual to determine how to install
- them.</P>
+<H2><A name="inst">Installing Apache for Windows</A></H2>

-<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>
+Run the Apache <SAMP>.exe</SAMP> file you downloaded above. This will
+ask for:

-<P>The master Apache makefile instructions are contained in the
- <CODE>Makefile.nt</CODE> file. To compile Apache, simply use one of
- the following commands:
<UL>
-<LI><CODE>nmake /f Makefile.nt _apacher</CODE> (release build)
-<LI><CODE>nmake /f Makefile.nt _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>
+ <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.

-<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.</P>
+</UL>

-<P>Project files (<CODE>.DSP</CODE>) are included for each of the
- portions of Apache. The three projects that are necessary for
- Apache to run are <CODE>Apache.dsp</CODE>, <CODE>ap/ap.dsp</CODE>,
- <CODE>regex/regex.dsp</CODE>, <CODE>ApacheCore.dsp</CODE> and
- <CODE>os/win32/ApacheOS.dsp</CODE>. The <CODE>src/win32</CODE>
- subdirectory contains project files for the optional modules (see
- below).</P>
+<P>

-<H2><A name="inst">Installing Apache for Windows</A></H2>
+<STRONG>Important note for 1.3b6 installs</STRONG>: the installer for
+1.3b6 will overwrite any existing <SAMP>httpd.conf</SAMP>,
+<SAMP>access.conf</SAMP>, <SAMP>srm.conf</SAMP> or
+<SAMP>mime.types</SAMP> files in the <SAMP>conf</SAMP>, and will also
+overwrite your <SAMP>index.html</SAMP> file in the <SAMP>htdocs</SAMP>
+directory. You should copy this files or directories before installing
+Apache 1.3b6, or install into a new directory.
+
+<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 the files should work as installed.

-<P>Once Apache has been compiled, it needs to be installed in its server
- root directory. The hard-coded default is the <CODE>\Apache</CODE>
- directory, on the current hard drive. Another directory may be used,
- but the files will need to be installed manually.</P>
+<H2><A name="inst">Running Apache for Windows</A></H2>

-<P>To install the files into the <CODE>\Apache</CODE> directory
- automatically, use one the following nmake commands (see above):</P>
+There are two ways you can run Apache:
+
<UL>
-<LI><CODE>nmake /f Makefile.nt installr</CODE> (for release build)
-<LI><CODE>nmake /f Makefile.nt installd</CODE> (for debug build)
+ <LI>As a "service" (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 console window. This is the only option available for
+ Windows 95 users.
</UL>

-<P>This will install the following:</P>
+To start Apache as a service, you first need to install it as a
+service. Run the "Install Apache as Service" option from the Start
+menu. Once this is done you can start Apache 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 Apache from the control line
+with

-<UL>
- <LI><CODE>\Apache\Apache.exe</CODE> - Apache executable
- <LI><CODE>\Apache\ApacheCore.dll</CODE> - Main Apache shared library
- <LI><CODE>\Apache\modules\ApacheModule*.dll</CODE> - Optional Apache
- modules (7 files)
- <LI><CODE>\Apache\conf</CODE> - Empty configuration directory
- <LI><CODE>\Apache\logs</CODE> - Empty logging directory
-</UL>
+<PRE>
+ NET START APACHE
+ NET STOP APACHE
+</PRE>

-<P>If you do not have nmake, or wish to install in a different directory,
- be sure to use a similar naming scheme.</P>
+To run Apache from a console window, select the "Apache Server" option
+from the Start menu. 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, press Control-C within the console
+window.
+
+<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.
+
+<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>

-<H2><A name="use">Using 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 first step is to set up Apache's configuration files. Default
- configuration files for Windows are located in the <CODE>conf</CODE>
- subdirectory in the Apache distribution, and are named
- <CODE>httpd.conf-dist-win</CODE>, <CODE>access.conf-dist-win</CODE>
- and <CODE>srm.conf-dist-win</CODE>. Move these into
- <CODE>\Apache\conf</CODE>, and rename them <CODE>httpd.conf</CODE>,
- <CODE>access.conf</CODE> and <CODE>srm.conf</CODE>, respectively.</P>
-
-<P>Configuring Apache is nearly identical to the Unix version of Apache,
- so most of the standard <A HREF="./">Apache documentation</A> is
- applicable. A few things are, however, different, or new:</P>
+<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
@@ -202,31 +236,134 @@
Windows servers. <A HREF="mod/mod_isapi.html">More information
is available.</A>
</UL>
+
+<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 an simple
+interafce 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. During installation, a registry key will have
+been installed called:
+
+<PRE>
+ HKEY_LOCAL_MACHINE\Software\Apache Group\Apache\1.3 beta\ServerRoot
+</PRE>
+
+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 -s
+</PRE>
+
+(The -s option is not required by Windows 95, but on Windows NT it
+prevents Apache waiting to see if Apache is running as a
+service). Apache will execute, and will remain running until it
+is stopped by pressing control-C.

-<P>Once Apache is configured correctly, it is nearly ready to be
-run. However, we recommend you copy the <CODE>icons</CODE> and
-<CODE>htdocs</CODE> subdirectories from the Apache distribution to
-<CODE>\Apache</CODE>. The latter is especially important, as it contains
-the document root (what the server actually serves).
+<P>

-<P>Apache can be executed in one of two ways, directly from the command
- line, or as a Windows NT service. To run it from the command line, use
- the following command:
+To install Apache as a Windows NT service, use the following:
+
<PRE>
- C:\Apache&gt; <STRONG>apache -s</STRONG>
+ apache -i
</PRE>
+
+and to remove the Apache service, use

-<P>Apache will then execute, and will remain running until it is
- exited. To use Apache as a Windows NT service, use the following:</P>
<PRE>
- C:\Apache&gt; <STRONG>apache -i</STRONG>
+ apache -u
</PRE>
-<P>Then open the Services control panel, and start the Apache service.</P>
+
+If you want to run an installation of Apache in a directory other than
+the one in the registry key as above, use the <CODE>-f</CODE>
+command-line to specify the path to the <SAMP>httpd.conf</SAMP> file,
+or the <CODE>-d</CODE> option to specify the server root
+directory. These options can be used with any of the other flags as
+listed above. Again note that once Apache has read the
+<SAMP>httpd.conf</SAMP> file it will then start using the directory
+given on the <SAMP>ServerRoot</SAMP> directive line instead of the -f
+or -d command line argument.
+
+<H2><A name="comp">Compiling Apache for Windows</A></H2>
+
+<P>Compiling Apache requires Microsoft Visual C++ 5.0 to be properly
+ installed. It is easiest to compile with the command-line tools
+ (nmake, etc...). 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.nt</CODE> file. To compile Apache, simply use one of
+ the following commands:
+<UL>
+<LI><CODE>nmake /f Makefile.nt _apacher</CODE> (release build)
+<LI><CODE>nmake /f Makefile.nt _apached</CODE> (debug build)
+</UL>

-<P>If you installed Apache in a server root other than
- <CODE>\Apache</CODE>, you must use the <CODE>-f</CODE> command-line
- option to specify the httpd.conf file, or the <CODE>-d</CODE> option
- to specify the server root.</P>
+<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.</P>
+
+<P>Project files (<CODE>.DSP</CODE>) are included for each of the
+ portions of Apache. The three projects that are necessary for
+ Apache to run are <CODE>Apache.dsp</CODE>, <CODE>ap/ap.dsp</CODE>,
+ <CODE>regex/regex.dsp</CODE>, <CODE>ApacheCore.dsp</CODE> and
+ <CODE>os/win32/ApacheOS.dsp</CODE>. The <CODE>src/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.nt installr INSTDIR=<i>dir</i></CODE> (for release build)
+<LI><CODE>nmake /f Makefile.nt installd INSTDIR=<i>dir</i></CODE> (for debug build)
+</UL>
+
+The dir argument to INSTDIR gives the installation directory. The can
+be omitted if Apache is to be installed into <SAMP>\Apache</SAMP>.
+
+<P>This will install the following:</P>
+
+<UL>
+ <LI><CODE><i>dir</i>\Apache.exe</CODE> - Apache executable
+ <LI><CODE><i>dir</i>\ApacheCore.dll</CODE> - Main Apache shared library
+ <LI><CODE><i>dir</i>\modules\ApacheModule*.dll</CODE> - Optional Apache
+ modules (7 files)
+ <LI><CODE><i>dir</i>\conf</CODE> - Empty configuration directory
+ <LI><CODE><i>dir</i>\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>

<!--#include virtual="footer.html" -->
</BODY>