You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by wr...@locus.apache.org on 2000/06/09 20:33:04 UTC
cvs commit: apache-1.3/htdocs/manual win_service.html win_compiling.html windows.html
wrowe 00/06/09 11:33:03
Modified: . STATUS README-WIN.TXT
src CHANGES
htdocs/manual win_compiling.html windows.html
Added: htdocs/manual win_service.html
Log:
Andrew Braund's very complete review of the Win32 documentation!
These should have a profound effect on the number of Win32 inquiries
and problem reports.
I will have some minor notes on running as another user, and
using the perl .dsp conversion scripts to add as a seperate
commit later today.
Revision Changes Path
1.827 +3 -51 apache-1.3/STATUS
Index: STATUS
===================================================================
RCS file: /home/cvs/apache-1.3/STATUS,v
retrieving revision 1.826
retrieving revision 1.827
diff -u -r1.826 -r1.827
--- STATUS 2000/06/08 14:30:09 1.826
+++ STATUS 2000/06/09 18:32:56 1.827
@@ -1,5 +1,5 @@
1.3 STATUS:
- Last modified at [$Date: 2000/06/08 14:30:09 $]
+ Last modified at [$Date: 2000/06/09 18:32:56 $]
Release:
@@ -33,15 +33,9 @@
* Assure the windows.html reflects reality, today.
- running the service as a user other than SYSTEM (NT/2000).
- Document cvstodsp6.pl in win_compiling.html.
- Andrew Braund/OtherBill are working up Win32 doc revisions
- to commit Friday.
+ - CGI's cannot be unbuffered on the 1.3.13 Win32 port.
+ OtherBill is working up these final Win32 doc revisions
- * Hybrid of OtherBill's and JJK's Win9x services patches.
- - 2 more Win95/98 users must step up to test this new patch
- service9x.06070011.zip (with diffs in that message)
- - Keith has issues with the proposed patch, details to follow.
- - Andrew Braund has tested, is working up Win32 doc revisions.
-
* Close the security hole in stat() by testing for anything other
than conventional file-not-found, permission-denied errors and
rejecting the request then and there. By rights, all of these
@@ -72,15 +66,6 @@
PR: 5898
Status:
- * JJ Keijser's patch (99/10/06) to:
- - Run Apache as a service on Win9x (PR2208)
- - Making sure that Apache is shut down when the system is shutdown.
- under Win95 (PR1643, PR2472)
- - Use apache -i/-u to install/uninstalling Apache on Win9x
- - Make Apache shut down cleanly when run on Windows 95 (PR4125)
- PR#: PR2472, PR4125, PR1643 (suspended) and PR2208 (suspended).
- Status: Martin +1(untested)
-
* Gerd Knorr <gk...@berlinonline.de>'s patch to enable mod_auth_digest
to handle both Digest *and* Basic authentication modes.
PR: 5879
@@ -444,40 +429,7 @@
* the mutex should be critical-regions, since the current design
is creating a mess of SO calls that are unnecessary
- * CGIs
- - docs on how they work w/scripts
- - WTF is the buffering coming from?
- - we don't have a way to make non-blocking files on NT!
-
* performance
-
- * documentation:
- - running the server without admin
- - how CGIs work
- - update README.NT
- - short/long name handling
- - better status page on current state of NT for users
-
- * who should run the service? Who exactly is the "system account"?
-
- docs say:
-
- 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:
-
- 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?
* modules that need to be made to work on win32
- mod_example isn't multithreadreded
1.16 +13 -4 apache-1.3/README-WIN.TXT
Index: README-WIN.TXT
===================================================================
RCS file: /home/cvs/apache-1.3/README-WIN.TXT,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- README-WIN.TXT 2000/06/04 04:11:30 1.15
+++ README-WIN.TXT 2000/06/09 18:32:58 1.16
@@ -1,4 +1,3 @@
-
Apache
Version 1.3 (and up)
@@ -58,15 +57,24 @@
to run and configure Apache, or select the "Apache Documentation"
icon read the local copy installed with Apache.
+ If you have downloaded a tar.gz file, extract it to your hard drive
+ using WinZip or similar and look in the apache-1.3\htdocs\manual
+ folder of the archive for windows.html for instructions on using
+ Apache with Windows, win_service.html for instructions on using the
+ Apache server as a Windows 'service', and win_compiling.html for
+ help with compiling Apache.
+
Known Problems
--------------
To get information about the current set of known problems, see the
online bug reporting database at
- http://www.apache.org/bug_report.html. Bugs which affect Apache on
- Windows and not Apache on Unix can be found under the category
- "os-windows".
+ http://www.apache.org/bug_report.html
+
+ Bugs which affect Apache on Windows and not Apache on Unix can be
+ found under the category "os-windows".
+
Licensing
---------
@@ -92,4 +100,5 @@
The NT port was started with code provided to the Apache Group
by Ambarish Malpani of ValiCert, Inc. (http://www.valicert.com/).
+
1.1555 +5 -0 apache-1.3/src/CHANGES
Index: CHANGES
===================================================================
RCS file: /home/cvs/apache-1.3/src/CHANGES,v
retrieving revision 1.1554
retrieving revision 1.1555
diff -u -r1.1554 -r1.1555
--- CHANGES 2000/06/09 18:15:57 1.1554
+++ CHANGES 2000/06/09 18:32:59 1.1555
@@ -1,5 +1,10 @@
Changes with Apache 1.3.13
+ *) Significant overhaul of the Win32 port documentation contained in
+ the README-WIN.TXT, as well as the htdocs/manual pages windows.html,
+ win_compiling.html, and the new win_service.html.
+ [Andrew Braund <ab...@dingoblue.net.au>, William Rowe]
+
*) Add 'services' for Windows 95 and 98, including install/uninstall
options. The Apache server therefore can start when the OS loads,
and will not stop between logoffs. This implementation remains
1.2 +40 -15 apache-1.3/htdocs/manual/win_compiling.html
Index: win_compiling.html
===================================================================
RCS file: /home/cvs/apache-1.3/htdocs/manual/win_compiling.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- win_compiling.html 2000/05/11 03:39:17 1.1
+++ win_compiling.html 2000/06/09 18:33:01 1.2
@@ -20,7 +20,7 @@
See <A HREF="windows.html">Using Apache with Microsoft Windows</A>
before you begin.</P>
-<P>Compiling Apache requires Microsoft Visual C++ 5.0 to be properly
+<P>Compiling Apache requires Microsoft Visual C++ 5.0 (or 6.0) 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
@@ -43,6 +43,12 @@
information in the resulting files, making it easier to find bugs and
track down problems.</P>
+<P>If you get an error such as "the name specified is not recognized..."
+ then you need to run vcvars32.bat first. Enter the following command;<br>
+ "c:\Program Files\Microsoft Visual Studio\VC98\Bin\VCVARS32.BAT"<br>
+ (you will need to adjust this so it matches where your VC was installed) then
+ try the nmake command again.</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
@@ -95,28 +101,28 @@
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
+<P>To install the files into the <CODE>c:\ServerRoot</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>
+<LI><CODE>nmake /f Makefile.win installr INSTDIR=<EM>c:\ServerRoot</EM></CODE>
(for release build)
-<LI><CODE>nmake /f Makefile.win installd INSTDIR=<EM>dir</EM></CODE>
+<LI><CODE>nmake /f Makefile.win installd INSTDIR=<EM>c:\ServerRoot</EM></CODE>
(for debug build)
</UL>
-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>.
+The <EM>c:\ServerRoot</EM> 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> - Loadable Apache
+ <LI><CODE><EM>c:\ServerRoot</EM>\Apache.exe</CODE> - Apache executable
+ <LI><CODE><EM>c:\ServerRoot</EM>\ApacheCore.dll</CODE> - Main Apache shared library
+ <LI><CODE><EM>c:\ServerRoot</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 directory
- <LI><CODE><EM>dir</EM>\logs</CODE> - Empty logging directory
+ <LI><CODE><EM>c:\ServerRoot</EM>\bin\*.exe</CODE> - Administrator support executables
+ <LI><CODE><EM>c:\ServerRoot</EM>\conf</CODE> - Empty configuration directory
+ <LI><CODE><EM>c:\ServerRoot</EM>\logs</CODE> - Empty logging directory
</UL>
<P>If you do not have nmake, or wish to install in a different directory,
@@ -140,10 +146,29 @@
<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.
+and rename them to *.conf. You will need to copy over the conf/magic
+and conf/mime.types files as well. In order to serve documents
+you will need to create a htdocs\index.html or just copy over the standard Apache
+ones (This is a good idea as then you get the full Apache documentation on line).
+If you have previously run Apache from the c:\ServerRoot directory then please make
+sure you backup any files you wish to retain or only copy the files you want replaced.
+The following commands will copy all the required files to your
+c:\ServerRoot directory (***over-writing any that were there***);<br><br>
+
+<UL>
+<LI><CODE>xcopy ..\conf\*.conf-dist-win c:\ServerRoot\conf\*.conf</CODE><br>
+<LI><CODE>xcopy ..\conf\magic c:\ServerRoot\conf\</CODE><br>
+<LI><CODE>xcopy ..\conf\mime.types c:\ServerRoot\conf\</CODE><br>
+<LI><CODE>xcopy ..\htdocs\*.* c:\ServerRoot\htdocs\ /E</CODE><br>
+</UL>
+(adjust these so c:\ServerRoot matches the INSTDIR used above)
+<P>
+Edit the @@ServerRoot@@ entries in c:\ServerRoot\conf\httpd.conf to your
+actual server root (for example "c:/ServerRoot" Note: you must use forward
+slashes in Apache configuration files).<br>
+
<!--#include virtual="footer.html" -->
</BODY>
</HTML>
+
1.37 +120 -202 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.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- windows.html 2000/06/04 03:55:15 1.36
+++ windows.html 2000/06/09 18:33:02 1.37
@@ -16,14 +16,30 @@
<H1 ALIGN="CENTER">Using Apache With Microsoft Windows</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 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>This document explains how to install, configure and run Apache 1.3 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 all. If you find any bugs, please document them on
+ our <A HREF="http://www.apache.org/bug_report.html">bug reporting page.</A>
+ 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
+ <A HREF="misc/FAQ.html">Frequently Asked Questions</A> page and the other
+ relevant documentation topics. If you still have a question or problem,
+ please post it to the <A HREF="news:comp.infosystems.www.servers.windows">
+ comp.infosystems.www.servers.windows</A> newsgroup, where many Apache
+ users and several contributions are more than willing to answer new and
+ obscure questions about using Apache on Windows.</P>
+
+<P>The <A HREF="http://www.deja.com/group/comp.infosystems.www.servers.ms-windows">
+ deja.com archives</A> offer easy browsing of previous questions.
+ Searching the newsgroup archives, you will usually find your question was
+ 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
@@ -45,11 +61,12 @@
<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="#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="#service">Running Apache for Windows as a Service</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="#signalsrv">Signalling Service Apache when running</A>
+ <LI><A HREF="win_service.html#signalsrv">Signalling Service Apache when running</A>
<LI><A HREF="win_compiling.html">Compiling Apache for Microsoft Windows</A>
</UL>
@@ -63,15 +80,16 @@
not been tested. In all cases TCP/IP networking must be installed.</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
+ Service Pack 4 created known issues with TCPIP/WinSock integrity that
were resolved in later Service Packs.</P>
<P><STRONG>Note: "Winsock 2" is required for Apache 1.3.7 and
later.</STRONG></P>
<P>If running on Windows 95, the "Winsock2" upgrade must be installed
- before Apache will run. "Winsock2" for Windows 95 is available
- <A HREF="http://www.microsoft.com/windows95/downloads/">here</A>.</P>
+ before Apache will run. "Winsock2" for Windows 95 is available
+ <A HREF="http://www.microsoft.com/windows95/downloads/contents/WUAdminTools/S_WUNetworkingTools/W95Sockets2/Default.asp">here</a>
+ or via <A HREF="http://www.microsoft.com/windows95/downloads/">here</A>.</P>
<H2><A NAME="down">Downloading Apache for Windows</A></H2>
@@ -80,11 +98,9 @@
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>
+together with details of mirror web and anonymous FTP sites.</P>
-<P>
-
-You should download the version of Apache for Windows with the
+<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
@@ -114,9 +130,7 @@
</UL>
-<P>
-
-During the installation, Apache will configure the files in the
+<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
@@ -129,18 +143,14 @@
<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>
+<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
+file will be installed either). This should mean it is 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
+<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
@@ -153,79 +163,67 @@
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.
+ <LI>As a <A HREF="win_service.html">"service"</A> (mainly available on NT only,
+ highly experimental version for 95/98).
+ This is the best option if you want Apache to automatically start when your
+ machine boots, and to keep Apache running when you log-off.
+ <LI>From a <A HREF="#cmdline">console window</A>. This is the best option
+ available for Windows 95/98 users.
</UL>
+
+<P><STRONG>Complete the steps below before you proceed to attempt to
+ start Apache as a Window NT/2000 "<A HREF="win_service.html">service</A>"!</STRONG></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>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>
+<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>
+
+<H2><A NAME="test">Testing Apache for Windows</A></H2>
+
+<P>If you have trouble starting Apache please use the following steps to isolate
+ the problem. This applies if you started Apache using the
+ "Start Apache as a console app" shortcut from the Start menu and
+ the Apache console window closes immediately (or unexpectedly)
+ or if you have trouble starting Apache as a service.<br>
+</P>
+
+<P>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 review the error.log file for configuration mistakes.
+ If you accepted the defaults when you installed Apache, the commands would be:
+</P>
<PRE>
c:
cd "\program files\apache group\apache"
apache
<SAMP>Wait for Apache to exit, or press Ctrl+C</SAMP>
- cd logs
- more <error.log
+ more <logs\error.log
</PRE>
-<P><STRONG>Complete the steps above before you proceed to attempt to
- start Apache as a Window NT/2000 service!</STRONG></P>
+<P>After looking at the error.log you will probably have a good chance of working
+ out what went wrong and be able to fix the problem and try again. If you are unable
+ to work it out then please follow the <A HREF="#help">guidelines for assistance</A> at
+ the top of this document or in the <a href="misc/FAQ.html#what2do">FAQ</a>.
+ Whatever you do, do not give up! Once you get Apache running
+ you will love it.
+</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>
-<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
-
<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><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 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>
@@ -239,10 +237,9 @@
http://127.0.0.1/
</PRE>
-<P>
-
-Once your basic installation is working, you should configure it
+<P>Once your basic installation is working, you should configure it
properly by editing the files in the <SAMP>conf</SAMP> directory.
+</P>
<P>Because Apache <EM>CANNOT</EM> share the same port with another
TCPIP application, you may need to stop or uninstall certain
@@ -250,7 +247,9 @@
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>
+ same TCPIP ports. You may find the Windows "netstat -an" command useful
+ in finding out what ports are in use.
+</P>
<H2><A NAME="use">Configuring Apache for Windows</A></H2>
@@ -312,86 +311,7 @@
Filters.
</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>
-
-<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:
-
-<PRE>
- 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
-</PRE>
-
-<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>
The Start menu icons and the NT Service manager can provide a simple
@@ -404,12 +324,12 @@
in two ways:
<UL>
-<LI>-f specifies a path to a particular configuration file
+<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)
+<LI>-n specifies the configuration file of an installed Apache service (Apache 1.3.7 and later):
</UL>
<PRE> apache -n "service name"</PRE>
@@ -454,7 +374,7 @@
<P>
If you did not do a binary install then Apache will in some
-scenarios complain that about the missing registry key. This
+scenarios complain about the missing registry key. This
warning can be ignored if it otherwise was able to find its
configuration files.
@@ -480,32 +400,14 @@
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
+You can tell a running Apache to stop by opening another console window and running:
<PRE>
apache -k shutdown
+ or
+ apache -k stop
</PRE>
<BLOCKQUOTE>
<STRONG>Note: This option is only available with Apache 1.3.3 and
@@ -514,15 +416,15 @@
</BLOCKQUOTE>
<P>
-This should be used instead of pressing Control-C in the running
+This should be used instead of pressing Control-C in a running
Apache console window, because it lets Apache end any current
-transactions and cleanup gracefully.
+transactions and cleanup gracefully. (As of version 1.3.13 pressing
+Control-C in the running window will also cleanup gracefully).
-<P>
-
-You can also tell Apache to restart. This makes it re-read the
+<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
+complete without interruption. To restart Apache, run:
+</P>
<PRE>
apache -k restart
@@ -532,6 +434,22 @@
later. For earlier versions, you need to use Control-C in the
Apache console window to shut down the server.</STRONG>
</BLOCKQUOTE>
+
+<P>Another feature is the configuration files test command.
+To test the Apache configuration files, run:
+</P>
+
+<PRE>
+ apache -t
+</PRE>
+
+<P>This is especially useful following alterations to the configuration files
+while Apache is still running. You can make the changes, confirm that the syntax is
+good by issuing the "apache -t" command, then restart Apache with "apache -k restart". Apache will
+re-read the configuration files, allowing any transactions in progress to
+complete without interruption. Any new request will then be served using the new configuration.
+</P>
+
<P>
Note for people familiar with the Unix version of Apache: these
1.1 apache-1.3/htdocs/manual/win_service.html
Index: win_service.html
===================================================================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<TITLE>Running Apache for Windows as a Service</TITLE>
</HEAD>
<!--#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 Win NT/2000. (There is also some HIGHLY EXPERIMENTAL
support for a similar effect on <a href="#win95svc">Win95/98</a>).
</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 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><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.
<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>
<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:
<PRE>
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
</PRE>
<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>
<P><STRONG>Note on default "System account" (LocalSystem) that Apache will run under.</STRONG></P>
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:
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:
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>
<H2><A NAME="trouble">Troubleshooting Apache for Windows as a Service</A></H2>
<P>When starting Apache as a service you may encounter an error message from
Windows service manager. For example if you try to start Apache using the Services
applet in Windows Control Panel you may get the following message;
<PRE>
Could not start the apache service on \\COMPUTER
Error 1067; The process terminated unexpectedly.
</PRE>
<P>You will get this error if there is any problem starting Apache. In order to see
what is causing the problem you should follow the instructions
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>
On Windows NT, multiple instances of Apache can be run as services.
Signal an Apache service to start, restart, or shutdown/stop as follows:
<PRE>
apache -n "service name" -k start
apache -n "service name" -k restart
apache -n "service name" -k shutdown
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:
<PRE>
NET START "service name"
NET STOP "service name"
</PRE>
<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>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>
<PRE>
apache -i
</PRE>
<P>You can run Apache as a Windows 95/98 service as follows:
</P>
<PRE>
apache -k runservice
</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>
<P>You can uninstall the Apache service as follows:
</P>
<PRE>
apache -u
</PRE>
<!--#include virtual="footer.html" -->
</BODY>
</HTML>