httpd-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject cvs commit: httpd-docs-2.0/htdocs/manual/platform windows.html
Date Wed, 22 Nov 2000 20:10:17 GMT
slive       00/11/22 12:10:16

  Modified:    htdocs/manual/platform windows.html
  At least temporarily restore the content to this file so that it is right
  in the next alpha release.  The CVS history is completely wrong :-(
  Revision  Changes    Path
  1.7       +493 -156  httpd-docs-2.0/htdocs/manual/platform/windows.html
  Index: windows.html
  RCS file: /home/cvs/httpd-docs-2.0/htdocs/manual/platform/windows.html,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -d -b -u -r1.6 -r1.7
  --- windows.html	2000/06/03 06:59:57	1.6
  +++ windows.html	2000/11/22 20:10:15	1.7
  @@ -1,7 +1,7 @@
   <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
  -<TITLE>Compiling Apache for Microsoft Windows</TITLE>
  +<TITLE>Using Apache with Microsoft Windows</TITLE>
   <!-- Background white, links blue (unvisited), navy (visited), red (active) -->
  @@ -14,168 +14,505 @@
   <!--#include virtual="header.html" -->
  -<H1 ALIGN="CENTER">Compiling Apache for Microsoft Windows</H1>
  +<H1 ALIGN="CENTER">Using Apache With Microsoft Windows</H1>
  -<P>There are many important points before you begin compiling Apache.
  -   See <A HREF="windows.html">Using Apache with Microsoft Windows</A>
  -   before you begin.</P>
  +<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="">bug reporting page.</A></P>
  -<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.  Be especially aware that the vcvars32.bat file from the 
  -   Program Files/DevStudio/VC/bin folder may be required to prepare the 
  -   command-line environment for command-line builds!</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 
  +   <A HREF="win_compiling.html">Compiling Apache for Microsoft Windows</A>.
  -<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></CODE> file. To compile Apache on Windows, simply
  -   use one of the following commands:<P>
  -<LI><CODE>nmake /f _apacher</CODE> (release build)
  -<LI><CODE>nmake /f _apached</CODE> (debug build)
  +  <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="win_compiling.html">Compiling Apache for Microsoft Windows</A>
  -<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. To simplify this process, a Visual Studio workspace,
  -   Apache.dsw, is provided in the src folder.  This workspace exposes
  -   the entire list of working .dsp projects that are required for the
  -   complete Apache binary release.  It includes dependencies between
  -   the projects to assure that they are built in the appropriate order.</P>
  +<H2><A NAME="req">Requirements</A></H2>
  -<P><STRONG>Notice: The Apache/VisualStudio project files are distributed
  -   in VisualStudio 6.0 (98) format.</STRONG>  In fact you may build with
  -   VisualStudio 5.0 (97) but you must first use the perl script command:</P>
  +<P>Apache 2.0 is designed to run on Windows NT 4.0 and Windows 2000. The 
  +   binary installer will only work with the x86 family of processors, such
  +   as Intel's. Apache may also run on Windows 95 and 98, but these have not 
  +   been tested, and are never recommended for production servers. In all 
  +   cases TCP/IP networking must be installed.</P>
  +<P>If running on Windows 95, the "Winsock2" upgrade MUST BE INSTALLED. 
  +   "Winsock2" for Windows 95 is available 
  +   <A HREF="">here</A>.</P>
  +<P>If running on NT 4.0, installing Service Pack 3 or 6 is recommended, as
  +   Service Pack 4 created known issues with TCPIP/WinSock integrety that
  +   were resolved in later Service Packs.</P>
  +<P><STRONG>Warning: as of alpha 2.0a4 Windows 95 (and possibly 98) do not
  +   run at all.  Please don't let that stop you, however, from contributing
  +   the fixes required to make that platform run successfully.</STRONG></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="">
  +</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).</P>
  +<P><STRONG>Notice: alpha versions are not distributed in binary form (as
  +   an .exe ready-to-run version).  You must use the Microsoft Visual C++
  +   compiler version 5 or 6 (bundled in VisualStudio 97 and 98).  Read 
  +   <A HREF="win_compiling.html">Compiling Apache for Microsoft Windows</A>
  +   for compilation/installation instructions.</STRONG></P>
  +<H2><A NAME="inst">Installing Apache for Windows</A></H2>
  +<P>Run the Apache <SAMP>.exe</SAMP> file you downloaded above. This will
  +   ask for:</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>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>
  +<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>
  +<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.</P>
  +<H2><A NAME="run">Running Apache for Windows</A></H2>
  +There are two ways you can run Apache:
  + <LI>As a <A HREF="#service">"service"</A> (available on Windows NT/2000
  +    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/98 users, and MUST be used by Windows NT/2000
  +    users before to attempting to run as a service.
  +<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>
  +<P>If the Apache console window closes immediately (or unexpectedly),
  +   run the "Command Prompt" from the Start Menu - Programs list.  Change
  +   to the folder to which you installed Apache, type the command apache,
  +   and read the error message.  Then change to the logs folder, and review
  +   the error.log file for configuration mistakes.  If you accepted the
  +   defaults when you installed Apache, the commands would be:</P>
  -    cd src\helpers
  +  c:
  +  cd "\program files\apache group\apache"
  +  apache
  +  <SAMP>Wait for Apache to exit, or press Ctrl+C</SAMP>
  +  cd logs
  +  more &lt;error.log
  -<P>Without running the script you will be able to load and build Apache,
  -   however VisualStudio 97 in particular will not recognize the /ZI flag
  -   to the C compiler for the debugging mode.  This script toggles the
  -   new /ZI flag back to /Zi for Debug builds, among other adjustments.
  -   The converse script in <CODE>src/helpers/</CODE> will 
  -   reverse the adjustments, and we ask you to do so before submitting 
  -   patches against any .dsp project files.</P>
  +<P><STRONG>Complete the steps above before you proceed to attempt to 
  +   start Apache as a Window NT/2000 service!</STRONG></P>
  -<P>The Apache.dsw workspace and nmake script both build the
  -   .dsp projects of the Apache server in the following sequence:</P>
  +<P>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 Apac
  +   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 con
  +   line with:</P>
  -   <LI><CODE>lib\apr\aprlib.dsp</CODE>
  -   <LI><CODE>lib\apr\aprlibdll.dsp <EM>requires aprlib</EM></CODE>
  -   <LI><CODE>lib\pcre\dftables.dsp</CODE>
  -   <LI><CODE>lib\pcre\pcre.dsp <EM>requires dftables</EM></CODE>
  -   <LI><CODE>lib\pcre\pcreposix.dsp <EM>requires dftables and pcre</EM></CODE>
  -   <LI><CODE>lib\expat-lite\xmltok.dsp</CODE>
  -   <LI><CODE>lib\expat-lite\xmlparse.dsp <EM>requires xmltok</EM></CODE>
  -   <LI><CODE>main\gen_uri_delims.dsp</CODE>
  -   <LI><CODE>main\gen_test_char.dsp</CODE>
  -   <LI><CODE>ApacheCore.dsp <EM>requires all of the above</EM></CODE>
  -   <LI><CODE>Apache.dsp <EM>requires ApacheCore and aprlibdll</EM></CODE>
  -   In addition, the <CODE>os\win32</CODE> subdirectory contains
  -   project files for the optional modules.
  +<P>See <A HREF="#signalsrv">Signalling Service Apache when Running</A>
  +   for more information on installing and controlling Apache services.</P>
  -  <LI><CODE>os\win32\ApacheModuleAuthAnon.dsp</CODE>
  -  <LI><CODE>os\win32\ApacheModuleAuthDigest.dsp</CODE>
  -  <LI><CODE>os\win32\ApacheModuleCERNMeta.dsp</CODE>
  -  <LI><CODE>os\win32\ApacheModuleExpires.dsp</CODE>
  -  <LI><CODE>os\win32\ApacheModuleFileCache.dsp</CODE>
  -  <LI><CODE>os\win32\ApacheModuleHeaders.dsp</CODE>
  -  <LI><CODE>os\win32\ApacheModuleInfo.dsp</CODE>
  -  <LI><CODE>os\win32\ApacheModuleRewrite.dsp</CODE>
  -  <LI><CODE>os\win32\ApacheModuleSpeling.dsp</CODE>
  -  <LI><CODE>os\win32\ApacheModuleStatus.dsp</CODE>
  -  <LI><CODE>os\win32\ApacheModuleUserTrack.dsp</CODE>
  -  <LI><CODE>modules\proxy\ApacheModuleProxy.dsp</CODE>
  +<P><STRONG>Apache, unlike many other Windows NT/2000 services, logs any
  +   errors to it's own error.log file in the logs folder within the
  +   Apache server root folder.  You will <EM>not</EM> find Apache error 
  +   details in the Windows NT Event Log.</STRONG></P>
  -   The <CODE>support\</CODE> folder contains project files for additional
  -   programs that are not part of the apache runtime, but are used by
  -   the administrator to test Apache and maintain password and log files.</P>
  +<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:</P>
  -  <LI><CODE>support\ab.dsp</CODE>
  -  <LI><CODE>support\htdigest.dsp</CODE>
  -  <LI><CODE>support\htpasswd.dsp</CODE>
  -  <LI><CODE>support\logresolve.dsp</CODE>
  -  <LI><CODE>support\rotatelogs.dsp</CODE>
  +  http://localhost/
  -<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>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:</P>
  -<P>To build and install all the files into the desired folder <EM>dir</EM>
  -   automatically, use one the following nmake commands:
  +<P>Once your basic installation is working, you should configure it
  +   properly by editing the files in the <SAMP>conf</SAMP> directory.
  +   Again, if you change the configuration of the Windows NT/2000
  +   service for Apache, first attempt to start it from the command
  +   line to assure that the service starts with no errors.</P>
  +<P>Because Apache <EMP>CANNOT</EMP> share the same port with another
  +   TCPIP application, you may need to stop or uninstall certain 
  +   services first.  These include (but are not limited to) other
  +   web servers, and firewall products such as BlackIce.  If you can
  +   only start Apache with these services disabled, reconfigure either
  +   Apache or the other product so that they do not listen on the
  +   same TCPIP ports.</P>
  +<H2><A NAME="use">Configuring Apache for Windows</A></H2>
  +<P>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>
  +<P>The main differences in Apache for Windows are:</P>
  -  <LI><CODE>nmake /f installr INSTDIR=<EM>dir</EM></CODE>
  -      (for release build)
  -  <LI><CODE>nmake /f installd INSTDIR=<EM>dir</EM></CODE>
  -      (for debug build)
  +  <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>
  +    LoadModule status_module modules/ApacheModuleStatus.dll
  +      <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>  Note that Apache <EMP>CANNOT</EMP> load ISAPI
  +                 Filters.
  -   The <EM>dir</EM> argument to INSTDIR gives the installation directory; it

  -   can be omitted if Apache is to be installed into <SAMP>\Apache</SAMP>.</P>
  +<H2><A NAME="service">Running Apache for Windows as a Service</A></H2>
  -<P>This will install the following:</P>
  +<P><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>
  +<P>You can install Apache as a Windows NT service as follows:
  +    apache -k install -n "service name"
  +  To install a service to use a particular configuration, specify the
  +  configuration file when the service is installed:
  +    apache -k install -n "service name" -f "\my server\conf\my.conf"
  +  To remove an Apache service, use
  +    apache -k uninstall -n "service name"
  +  The default "service name", if one is not specified, is "Apache".</P>
  +<P>Once a service is installed, you can use the <SAMP>-n</SAMP> option,
  +   conjunction with other options, to refer to a service's configuration 
  +   file.  For example:</P>
  +<P>To test a service's configuration file:</P>
  +    apache -n "service name" -t
  +<P>To start a console Apache using a service's configuration file:</P>
  +    apache -n "service name"
  +<P><STRONG>Important Note on service dependencies:</STRONG></P>
  +<P>Prior to Apache release 1.3.13, the dependencies required to
  +   successfully start an installed service were not configured.
  +   After installing a service using earlier versions of Apache, 
  +   you must follow these steps:
  +    Run regedt32
  +    Select <U>W</U>indow - "HKEY_LOCAL_MACHINE on Local Machine" from the menu
  +    Double-click to open the SYSTEM, then the CurrentControlSet keys
  +    Scroll down and click on the Apache servicename
  +    Select <U>E</U>dit - Add <U>V</U>alue... from the menu
  +    Fill in the Add Value dialog with 
  +        <U>V</U>alue Name: DependOnGroup 
  +        <U>D</U>ata Type: REG_MULTI_SZ
  +        and click OK
  +    Leave the Multi-String Editor dialog empty and click OK
  +    Select <U>E</U>dit - Add <U>V</U>alue... from the menu
  +    Fill in the Add Value dialog with 
  +        <U>V</U>alue Name: DependOnService
  +        <U>D</U>ata Type: REG_MULTI_SZ
  +        and click OK
  +    Type the following list (one per line) in the Multi-String Editor dialog
  +        Tcpip
  +        Afd
  +        and click OK
  +<P>If you are using COM or DCOM components from a third party module, ISAPI,
  +   or other add-in scripting technologies such as ActiveState Perl, you may
  +   also need to add the entry Rpcss to the DependOnService list.  To avoid
  +   exposing the TCP port 135 when it is unnecessary, Apache does not create
  +   that entry upon installation.  Follow the directions above to find or 
  +   create the DependOnService value, double click that value if it already 
  +   exists, and add the Rpcss entry to the list.</P>
  +<H2><A NAME="cmdline">Running Apache for Windows from the Command Line</A></H2>
  +<P>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>
  +<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 lin
  +   in two ways:
  -  <LI><CODE><EM>dir</EM>\Apache.exe</CODE> - Apache executable
  -  <LI><CODE><EM>dir</EM>\aprlib.dll</CODE> - Apache Portable
Runtime shared library
  -  <LI><CODE><EM>dir</EM>\ApacheCore.dll</CODE> - Apache Core
  -  <LI><CODE><EM>dir</EM>\modules\ApacheModule*.dll</CODE>
- Loadable Apache
  -      modules
  -  <LI><CODE><EM>dir</EM>\bin\*.exe</CODE> - Administrator
support executables
  -  <LI><CODE><EM>dir</EM>\conf</CODE> - Empty configuration
  -  <LI><CODE><EM>dir</EM>\logs</CODE> - Empty logging directory
  +<LI>-f specifies a path to a particular configuration file
  +<PRE>    apache -f "c:\my server\conf\my.conf"</PRE>
  +<PRE>    apache -f test\test.conf</PRE>
  +<LI>-n specifies the configuration file of an installed Apache service (Apache 1
  +.3.7 and later)
  +<PRE>    apache -n "service name"</PRE>
  -<P>If you do not have nmake, or wish to install in a different directory,
  -   be sure to use a similar naming scheme, or use the following shortcut.</P>
  +   In these cases, the proper ServerRoot should be set in the configuration file
  -<P>To simplify the process, dependencies between all projects
  -   are defined in the Microsoft VisualStudio workspace 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".  Invok
  +   Apache with the -V switch will display this value labeled as SERVER_CONFIG_FI
  +   Apache will then determine its ServerRoot by trying the following, in this or
  +<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.
  +<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>
  +<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
  +<P>During a binary installation, a version-specific registry key is created 
  +   in the Windows registry:
  -   src/Apache.dsw
  +  HKEY_LOCAL_MACHINE\Software\Apache Group\Apache\1.3.7
  +  HKEY_LOCAL_MACHINE\Software\Apache Group\Apache\2.0a3
  -<P>This assures that lower-level sources are rebuilt from within
  -   VisualStudio.  The top level project is InstallBin, which invokes 
  - to move the compiled executables and dlls.  You may 
  -   personalize the INSTDIR= setting by changing the Settings for
  -   InstallBin, Build command line entry under the General tab.
  -   The default from within the InstallBin.dsp project is one level up
  -   (..) from the src tree.</P>
  +<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>
  -<P><STRONG>Warning about building Apache from the development tree</STRONG></P>
  +<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>
  -<P>Only the .dsp files are distributed between release builds.  The
  -   .mak files are NOT regenerated, due to the tremendous waste of
  -   reviewer's time.  Therefore, you cannot rely on the NMAKE commands 
  -   above to build revised .dsp project files unless you then export
  -   all .mak files yourself from the project.  This is unnecessary if 
  -   you build from withing the Microsoft DeveloperStudio environment.</P>   
  +<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>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.</P>
  +<P>To run Apache from the command line as a console application, use the
  +   following command:
  +    apache 
  +   Apache will execute, and will remain running until it is stopped by pressing
  +   control-C.</P>
  +<H2><A NAME="signalsrv">Signalling Service Apache when running</A></H2>
  +<P>On Windows NT, multiple instances of Apache can be run as services.
  +   Signal an Apache service to start, restart, or shutdown as follows:</P>
  +    apache -n "service name" -k start
  +    apache -n "service name" -k restart
  +    apache -n "service name" -k shutdown
  +<P>In addition, you can use the native NT NET command to
  +   start and stop Apache services as follows:</P>
  +    NET START "service name"
  +    NET STOP "service name"
  +<H2><A NAME="signal">Signalling Console Apache when running</A></H2>
  +<P>On Windows 95, Apache runs as a console application. You can tell a
  +   running Apache to stop by opening another console window and typing:</P>
  +    apache -k shutdown
  +<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>
  +<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</P>
  +    apache -k restart
  +<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.</P>
   <!--#include virtual="footer.html" -->

View raw message