httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@locus.apache.org
Subject cvs commit: apache-1.3/htdocs/manual win_service.html windows.html
Date Sat, 10 Jun 2000 19:19:35 GMT
wrowe       00/06/10 12:19:35

  Modified:    htdocs/manual win_service.html windows.html
  Log:
    A little more cleanup of win_service and windows .html docs.
  
    Covered the Log On As... option just a little better, with some hints.
  
    Dire warnings about Win95/98 at the end of the services section.
  
    Roll back Win95/98 services directives, and just point out differences.
  
    Get rid of the silly word 'signalling' - which means squat to your
    typical Win32 user!
  
    Anything else anyone can think of to cover?
  
  Revision  Changes    Path
  1.2       +162 -118  apache-1.3/htdocs/manual/win_service.html
  
  Index: win_service.html
  ===================================================================
  RCS file: /home/cvs/apache-1.3/htdocs/manual/win_service.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- win_service.html	2000/06/09 18:33:02	1.1
  +++ win_service.html	2000/06/10 19:19:34	1.2
  @@ -4,93 +4,116 @@
   <TITLE>Running Apache for Windows as a Service</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">Running Apache for Windows as a Service</H1>
   
  -<P>Running Apache as a service should only be done once you have successfully run
  -it as a console application. See <A HREF="windows.html">Using Apache with Microsoft
Windows</A>
  -before you attempt to run it as a service.
  -</P>
  +<P>Apache can be run as a service on Windows NT/2000.  (There is also some 
  +   HIGHLY EXPERIMENTAL support for similar behavior on 
  +   <a href="#win95svc">Windows 95/98</a>, introduced with Apache 1.3.13).</P>
  +
  +<P>Installing Apache as a service should only be done once you can 
  +   successfully run it in a console window. See 
  +   <A HREF="windows.html">Using Apache with Microsoft Windows</A>
  +   before you attempt to install or run Apache as a service. Changes to the 
  +   httpd.conf file should always be followed by starting Apache as a console 
  +   window.  If this succeeds, the service should succeed.</P>
  +
  +<P><STRONG>NOTE: Prior to version 1.3.13, the configuration was <EM>not

  +   tested</EM> prior to performing the installation</STRONG>, and a lack of

  +   service dependencies often caused the console window to succeed, but the
  +   service would still fail.  See <A HREF="#service">below</A> if you are 
  +   having problems running a version of Apache prior to 1.3.13 to resolve the 
  +   issue.  If you have this problem with version 1.3.13 or greater, first try 
  +   uninstalling (-u) and re-installing (-i) the Apache service.</P>
   
  -<P>Apache can be run as a service on Win NT/2000. (There is also some HIGHLY EXPERIMENTAL
  -support for a similar effect on <a href="#win95svc">Win95/98</a>).
  -</P>
  +<HR>
   
   <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 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
  +   service by opening the Services window (in the Control Panel), selecting 
  +   Apache, then clicking on Start. Apache will now be running, hidden 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 command line with</P>
   
   <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>See <A HREF="#signal">Controlling Apache as a Service</A>
  +   for more information on installing and controlling Apache services.</P>
   
   <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>
  +
  +<P>After starting Apache as a service (or if you have trouble starting it) 
  +   you can test it using the same <A HREF="windows.html#test">procedure</a>
  +   as for running in a console window.  Remember to use the command:</P>
   
  -<P>
  +<PRE>
  +  apache -n "service name"
  +</PRE>
   
  -After starting Apache as a service (or if you have trouble starting it) you can test it
  -using the same <A HREF="windows.html#test">procedure</a> as for running in
a console window.
  +<P>to assure you are using the service's configuration.</P>
   	 
   	 
   <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>
  +<P><STRONG>Note: The -n option to specify a service name is only available
  +   with Apache 1.3.7 and later.</STRONG>  Earlier versions of Apache only 
  +   support the default service name 'Apache'.</P>
   
  -You can install Apache as a Windows NT service as follows:
  +<P>You can install Apache as a Windows NT service as follows:</P>
   
   <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:
  +<P>To install a service to use a particular configuration, specify the
  +   configuration file when the service is installed:</P>
   
   <PRE>
       apache -i -n "service name" -f "\my server\conf\my.conf"
   </PRE>
   
  -To remove an Apache service, use
  +<P>To remove an Apache service, use:</P>
   
   <PRE>
       apache -u -n "service name"
   </PRE>
   
  -The default "service name", if one is not specified, is "Apache".
  +<P>The default "service name", if one is not specified, is "Apache".</P>
   
  -<P>
  +<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:</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:
  +<P>To test a service's configuration file:</P>
   <PRE>
       apache -n "service name" -t
   </PRE>
   
  -To start a console Apache using a service's configuration file:
  +<P>To start a console Apache using a service's configuration file:</P>
   <PRE>
       apache -n "service name"
   </PRE>
   
  -<P><STRONG>Important Note on service dependencies:</STRONG></P>
  +<H2><A NAME="depends">Important Note on service dependencies:</A></H2>
   
   <P>Prior to Apache release 1.3.13, the dependencies required to
      successfully start an installed service were not configured.
  @@ -128,31 +151,71 @@
      exists, and add the Rpcss entry to the list.</P>
   
   
  -<P><STRONG>Note on default "System account" (LocalSystem) that Apache will
run under.</STRONG></P>
  +<H2>User Account for Apache Service to Run As (NT/2000)</H2>
   
  -     When Apache is installed as a service e.g. with the apache -i command, it will run
 
  -		 as "System Account" (LocalSystem) user.
  -<PRE>
  -       docs say:
  +<P>When Apache is first installed as a service (e.g. with the -i option)
  +   it will run as user "System" (the LocalSystem account).  There should
  +   be few issues if all resources for the web server reside on the local
  +   system, but it has broad security privilages to affect the local machine!</P>
  +
  +<BLOCKQUOTE>
          LocalSystem is a very privileged account locally, so 
          you shouldn't run any shareware applications there. 
          However, it has no network privileges and cannot leave 
          the machine via any NT-secured mechanism, including
          file system, named pipes, DCOM, or secure RPC.
  - 
  -       and:
  - 
  +</BLOCKQUOTE> 
  +
  +<P><STRONG>NEVER grant network privilages to the SYSTEM account!</STRONG>
  +   Create a new user account instead, grant the appropriate privilages to
  +   that user, and use the the 'Log On As:' option.  Select the Start Menu ->
  +   Settings -> Control Panel -> Services -> apache service ... and click 
  +   the "Startup" button to access this setting.</P>
  +
  +<BLOCKQUOTE>
          A service that runs in the context of the LocalSystem account
  -       inherits the security context of the SCM. It is not 
  -       associated with any logged-on user account and does not have 
  -       credentials (domain name, user name, and password) to be used
  -       for verification. This has several implications: [... removed ...]
  - 
  -       That _really_ sucks.  Can we recommend running Apache as some 
  -       other user?
  -			 
  -   <i>Recommendations to be added...</i>
  -</PRE>
  +       inherits the security context of the SCM. It is not associated with 
  +       any logged-on user account and does not have credentials (domain name,
  +       user name, and password) to be used for verification. 
  +</BLOCKQUOTE>
  +
  +<P>The SYSTEM account has no privilages to the network, so shared pages or
  +   a shared installation of Apache is invisible to the service.  If you intend
  +   to use <EM>any</EM> network resources, the following steps should help:</P>
  +
  +<UL>
  +<LI>Select Apache from the Control Panel's Service dialog and click Startup.
  +<LI>Verify that the service account is correct.  You may wish to create an 
  +    account for your Apache services.
  +<LI>Retype the password and password confirmation.
  +<LI>Go to User Manager for Domains.
  +<LI>Click on Policies from the title bar menu, and select User Rights.
  +<LI>Select the option for Advanced User Rights.
  +<LI>In the drop-down list, verify that the following rights have been 
  +    granted to the selected account:
  +    <UL>
  +        <LI>Act as part of the operating system
  +        <LI>Back up files and directories
  +        <LI>Log on as a service
  +        <LI>Restore files and directories
  +    </UL>
  +<LI>Confirm that the selected account is a member of the Users group.
  +<LI>Confirm the selected account has access to all document and script 
  +    directories (minimally read and browse access).
  +<LI>Confirm the selected account has read/write/delete access to the Apache 
  +    logs directory!
  +</UL>
  +
  +<P>If you allow the account to log in as a user, then you can log in yourself
  +   and test that the account has the privilages to execute the scripts, read
  +   the web pages, and that you can start Apache in a console window.  If this
  +   works, and you have followed the steps above, Apache should execute as
  +   a service with no problems.</P>
  +<P><STRONG>Note: error code 2186</STRONG> is a good indication that you
need 
  +   to review the 'Log On As' configuration, since the server can't access a 
  +   required network resource.</STRONG></P>
  +
  +
   
   <H2><A NAME="trouble">Troubleshooting Apache for Windows as a Service</A></H2>
   
  @@ -168,36 +231,17 @@
   	for <a href="windows.html#test">Testing Apache at the Command Prompt</a>.
   </P>
   	
  -<P><STRONG>Note on error code 2186.</STRONG>
  -</P>
  -<P>If you encounter error 2186 when trying to start Apache, the following workaround
may help;
  -</P>
  -<PRE>
  -   Select the service in Control Panel and click Startup.
  -   Verify that the service account is correct.
  -   Retype the password and password confirmation.
  -   Go to User Manager for Domains.
  -   Click on Policies from the title bar menu, and select User Rights.
  -   Select the option for Advanced User Rights.
  -   In the drop-down list, verify that the following rights have been 
  -   granted to the service account:
  -   Act as part of the operating system
  -   Back up files and directories
  -   Log on as a service
  -   Restore files and directories
  -</PRE>
  -
  -
   <H2><A NAME="cmdline">Running Apache for Windows from the Command Line</A></H2>
   
   For details on controlling Apache service from the command line, please refer to
   <a href="windows.html#cmdline">console command line</a> section.
   
   
  -<H2><A NAME="signalsrv">Signalling Service Apache when running</A></H2>
  +<H2><A NAME="signal">Controlling Apache as a Service</A></H2>
   
  -On Windows NT, multiple instances of Apache can be run as services.
  -Signal an Apache service to start, restart, or shutdown/stop as follows:
  +<P>Multiple instances of Apache can be installed and run as services. Signal 
  +   an installed Apache service to start, restart, or shutdown/stop 
  +   as follows:</P>
   
   <PRE>
       apache -n "service name" -k start
  @@ -206,69 +250,69 @@
       apache -n "service name" -k stop
   </PRE>
   
  -(Note; shutdown and stop are identical actions).
  -In addition, you can use the native NT NET command to
  -start and stop Apache services as follows:
  +<P>For the default "Apache" service, the -n Apache option is still required, 
  +   since the -k commands without the -n option are directed at Apache running 
  +   in a  console window.  The quotes are only required if the service name 
  +   contains spaces.</P>
  +
  +<P><STRONG>Note: the -k stop alias for the -k shutdown command was introduced
  +   in Apache version 1.3.13.</STRONG>  Earlier versions of Apache will only
  +   recognize the -k shutdown option.  Prior to 1.3.3, Apache did not recognize
  +   <EM>any</EM> -k options at all!</P>
   
  +<P>In addition, you can use the native NT NET command to
  +   start and stop Apache services as follows:</P>
  +
   <PRE>
       NET START "service name"
       NET STOP "service name"
   </PRE>
   
  +<P>Again, quotes are only required if the service name contains spaces.</P>
   
   <H2><A NAME="win95svc">HIGHLY EXPERIMENTAL Windows 95/98 Service</A></H2>
   
  -There is some support for Apache on Windows 95/98 to behave in a similar
  -manner as a service on NT/2000. This is HIGHLY EXPERIMENTAL,
  -if it works (at all) the Apache Group can not attest to it's reliability
  -or future support of the feature. Use at your own risk!
  +<P><STRONG>Note: The service options for Windows 95 and 98 are only available
  +   with Apache 1.3.13 and later.</STRONG>  Earlier versions of Apache only 
  +   supported Apache in a console window for Windows 95/98.</P>
  +
  +<P>There is some support for Apache on Windows 95/98 to behave in a similar
  +   manner as a service on Windows NT/2000. It is <EM>highly experimental</EM>,
  +   if it works (at all) the Apache Sofware Foundation will not attest to it's 
  +   reliability or future support. Proceed at your own risk!</P>
   
   <P>Once you have confirmed that Apache runs correctly at the
  -   <a href="windows.html#test">Command Prompt</a> you can install it as a
  -	  service with the command;
  -</P>
  +   <a href="windows.html#test">Command Prompt</a> you can install, control
  +   and uninstall it with the same commands as the Windows NT/2000 version.</P>
   
  -<PRE>
  -    apache -i
  -</PRE>
  +<P>There are, however, significant differences that you should note:</P>
   
  -<P>You can run Apache as a Windows 95/98 service as follows:
  -</P>
  +<P>Apache will attempt to start and if successful it will run in the 
  +   background.  If you run the command 
   
   <PRE>
  -    apache -k runservice
  +   Apache -n "service name" -k start
   </PRE>
  -
  -<P>Apache will attempt to start and if successful it will run in the background.
  -   If you ran this command via a shortcut on your desktop, for example, then if the service
starts
  -	 successfully a console window may flash up but will immediately disappear. 
  -	 If Apache detects any errors on startup such as a incorrect entries in the
  -   httpd.conf file then a console window will be left visible. This will display
  -   an error message which will be useful in tracking down the cause of the problem.
  -</P>
  -
  -<P>You can signal the Apache service to start, restart or shutdown/stop as follows:
  -</P>
   
  -<PRE>
  -    apache -k start
  -    apache -k restart
  -    apache -k shutdown
  -    apache -k stop
  -</PRE>
  -(Note; shutdown and stop are identical actions).
  -
  -<P>Windows 95/98 does not support NET START or NET STOP commands so
  -   you must use the above commands at a command prompt. You may wish to set up a shortcut
  -	 for each of these commands so that you can just click on it to perform the required action.
  -</P>
  +   via a shortcut on your desktop, for example, then if the service starts 
  +   successfully a console window will flash up but immediately disappears.
  +   If Apache detects any errors  on startup such as a incorrect entries in the
  +   httpd.conf file, then the console window will remain visible. This will 
  +   display an error message which will be useful in tracking down the cause of
  +   the problem.</P>
   
  -<P>You can uninstall the Apache service as follows:
  -</P>
  +<P>Windows 95/98 does not support NET START or NET STOP commands so you must 
  +   use Apache's Service Control options at a command prompt. You may wish to 
  +   set up a shortcut for each of these commands so that you can just choose 
  +   it from the start menu or desktop to perform the required action.</P>
   
  -<PRE>
  -    apache -u
  -</PRE>
  +<P>Apache and Windows 95/98 offer no support for running the Apache service 
  +   as a specific user with network privilages.  In fact, Windows 95/98 offers
  +   no security on the local machine, either.  This is the simple reason that
  +   the Apache Software Foundation never endorses the use of Windows 95/98 as a
  +   public httpd server.  These facilities exist only to assist the user in
  +   developing web content and learning the Apache server, and perhaps as a
  +   intranet server on a secured, private network.</P>
   
   <!--#include virtual="footer.html" -->
   </BODY>
  
  
  
  1.39      +99 -104   apache-1.3/htdocs/manual/windows.html
  
  Index: windows.html
  ===================================================================
  RCS file: /home/cvs/apache-1.3/htdocs/manual/windows.html,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- windows.html	2000/06/10 05:15:05	1.38
  +++ windows.html	2000/06/10 19:19:34	1.39
  @@ -14,7 +14,7 @@
   >
   <!--#include virtual="header.html" -->
   
  -<H1 ALIGN="CENTER">Using Apache With Microsoft Windows</H1>
  +<H1 ALIGN="CENTER"><A NAME="help">Using Apache With Microsoft Windows</A></H1>
   
   <P>This document explains how to install, configure and run Apache 1.3 under 
      Microsoft Windows. Please note that at this time, Windows support is 
  @@ -25,7 +25,6 @@
      Contributions are welcomed, please submit your code or suggestions to the 
      bug report page, or join the new-httpd mailing list.</P>
   
  -<A NAME="help"></A>
   <P>The bug reporting page and new-httpd mailing list are <EMP>not</EMP>

      provided to answer questions about configuration or running Apache.  
      Before you submit a bug report or request, first consult this document, the 
  @@ -42,17 +41,16 @@
      already asked and answered by other users!</P>
   
   <P><STRONG>Warning: Apache on NT has not yet been optimized for performance.
  -Apache still performs best, and is most reliable on Unix platforms.  Over
  -time we will improve NT 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 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>.
  +   </STRONG>Apache still performs best, and is most reliable on Unix platforms.
  +   Over time we will improve NT performance, and great progress is being made
  +   in the upcoming version 2.0 of Apache for the Windows platforms. Folks doing
  +   comparative reviews of webserver performance are asked to compare against 
  +   Apache on a Unix platform such as Solaris, FreeBSD, or Linux.</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>.
   
   <HR>
   
  @@ -63,10 +61,10 @@
     <LI><A HREF="#run">Running Apache for Windows</A>
     <LI><A HREF="#test">Testing Apache for Windows</A>
     <LI><A HREF="#use">Configuring Apache for Windows</A>
  -  <LI><A HREF="#cmdline">Running Apache for Windows from the Command Line</A>
  +  <LI><A HREF="#cmdline">Running Apache in a Console Window</A>
  +  <LI><A HREF="#signal">Controlling Apache in a Console Window</A>
     <LI><A HREF="win_service.html">Running Apache for Windows as a Service</A>
  -  <LI><A HREF="#signal">Signalling Console Apache when running</A>
  -  <LI><A HREF="win_service.html#signalsrv">Signalling Service Apache when running</A>
  +  <LI><A HREF="win_service.html#signal">Controlling Apache as a Service</A>
     <LI><A HREF="win_compiling.html">Compiling Apache for Microsoft Windows</A>
   </UL>
   
  @@ -98,25 +96,25 @@
   <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>
  +   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).
  +   <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>
   
   <H2><A NAME="inst">Installing Apache for Windows</A></H2>
   
  -Run the Apache <SAMP>.exe</SAMP> file you downloaded above. This will
  -ask for:
  +<P>Run the Apache <SAMP>.exe</SAMP> file you downloaded above. This will
  +   ask for:</P>
   
   <UL>
   
  @@ -163,7 +161,7 @@
   
   <H2><A NAME="run">Running Apache for Windows</A></H2>
   
  -There are two ways you can run Apache:
  +<P>There are two ways you can run Apache:</P>
   
   <UL>
    <LI>As a <A HREF="win_service.html">"service"</A> (tested on NT/2000
only, 
  @@ -184,8 +182,8 @@
      active until you stop Apache. To stop Apache running, either press 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>
  +   <A HREF="#signal">Controlling Apache in a Console Window</A> for commands
  +   to control Apache in a console window.</P>
   
   <P>In Apache 1.3.13 and above it is now quite safe to press Ctrl+C or 
      Ctrl+Break to stop the Apache in the console window.  And on Windows NT/2000
  @@ -326,16 +324,15 @@
   </UL>
   
   
  -<H2><A NAME="cmdline">Running Apache for Windows from the Command Line</A></H2>
  +<H2><A NAME="cmdline">Running Apache in a Console Window</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:
  +<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 
  +   line in two ways:</P>
   
   <UL>
   <LI>-f specifies a path to a particular configuration file:
  @@ -347,101 +344,99 @@
   </UL>
   <PRE>    apache -n "service name"</PRE>
   
  -In these cases, the proper ServerRoot should be set in the configuration file.
  +<P>In these cases, the proper ServerRoot should be set in the configuration 
  +   file.</P>
   
  -<P>
  +<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:</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>The 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>
  +
  +<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>
  -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:
  +<P>During a binary installation, a registry key will have
  +   been installed, for example:</P>
  +
   <PRE>
     HKEY_LOCAL_MACHINE\Software\Apache Group\Apache\1.3.13\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>
  +
  +<P>If you did not do a binary install then Apache will in some
  +   scenarios complain 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>
   
  -<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 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:
  +<P>To run Apache from the command line as a console application, use the
  +   following command:</P>
   
   <PRE>
       apache 
   </PRE>
   
  -Apache will execute, and will remain running until it is stopped by pressing
  -control-C.
  +<P>Apache will execute, and will remain running until it is stopped by pressing
  +   control-C.</P>
   
  -<H2><A NAME="signal">Signalling Console Apache when running</A></H2>
  +<H2><A NAME="signal">Controlling Apache in a Console Window</A></H2>
   
  -You can tell a running Apache to stop by opening another console window and running:
  +<P>You can tell a running Apache to stop by opening another console window and 
  +   running:</P>
   
   <PRE>
       apache -k shutdown
   </PRE>
  +
   <P><STRONG>Note: This option is only available with Apache 1.3.3 and
      later.</STRONG></P>
  - <P>For earlier versions, you must use Control-C in the
  -    Apache console window to shut down the server.</P>
  - <P>From version 1.3.3 through 1.3.12, this should be used instead of pressing
  -    Control-C in a running Apache console window, because it allowed Apache 
  -    to end any current transactions and cleanup gracefully.</P>
  - <P>As of version 1.3.13 pressing Control-C in the running window will cleanup 
  -    Apache quite gracefully, and you may use -k stop as an alias for 
  -    -k shutdown.  Earlier versions do not understand -k stop.</P>
  +
  +<P>For earlier versions, you must use Control-C in the
  +   Apache console window to shut down the server.</P>
   
  -<P>
  +<P>From version 1.3.3 through 1.3.12, this should be used instead of pressing
  +   Control-C in a running Apache console window, because it allowed Apache 
  +   to end any current transactions and cleanup gracefully.</P>
  +
  +<P>As of version 1.3.13 pressing Control-C in the running window will cleanup 
  +   Apache quite gracefully, and you may use -k stop as an alias for 
  +   -k shutdown.  Earlier versions do not understand -k stop.</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>
  +   configuration files. Any transactions in progress are allowed to
  +   complete without interruption. To restart Apache, run:</P>
   
   <PRE>
       apache -k restart
   </PRE>
  +
   <P><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, and then restart the
  
  
  

Mime
View raw message