From 9861f8bbd5a0b1770f6357a57774da48c8e6cd01 Mon Sep 17 00:00:00 2001 From: pcs Date: Sun, 10 May 1998 16:12:09 +0000 Subject: [PATCH] Update windows instructions for 1.3b6. Move compilation stuff to the end on the basis that most users will be interested in the pre-compiled installer. Document the registry key used and how it relates to command line arguments (-d, -f) and the ServerRoot directive. Show how to start and stop the Apache service from the command line. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@81233 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/platform/windows.html | 319 +++++++++++++++++++++--------- 1 file changed, 228 insertions(+), 91 deletions(-) diff --git a/docs/manual/platform/windows.html b/docs/manual/platform/windows.html index fe41c40246..9da3075dfa 100644 --- a/docs/manual/platform/windows.html +++ b/docs/manual/platform/windows.html @@ -16,8 +16,8 @@

Using Apache With Microsoft Windows

-

This document explains how to compile, install, configure and run - Apache 1.3b3 (or later) under Microsoft Windows. Please note that at +

This document explains how to install, configure and run + Apache 1.3b6 (or later) under Microsoft Windows. Please note that at this time, Windows support is entirely experimental, and is recommended only for experienced users. The Apache Group does not guarantee that this software will work as documented, or even at @@ -31,130 +31,164 @@ 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.

+

+ +Most of this document assumes that you are installing Windows from a +binary distribution. If you want to compile Apache yourself (possibly +to help with development, or to track down bugs), see the section on +Compiling Apache for Windows below. +



Requirements

-

Apache 1.3b3 requires the following:

+

Apache 1.3b6 requires the following:

* Apache may run with Windows NT 3.5.1, but has not been tested.

-

This documentation assumes good working knowledge of Microsoft - Windows, Microsoft Visual C++, and the Apache web server (for - Unix).

-

If running on Windows 95, using the "Winsock2" upgrade is recommended but may not be necessary. If running on NT 4.0, installing Service Pack 2 is recommended.

Downloading Apache for Windows

-

Information on the latest version of Apache can be found on the Apache -web server at Information on the latest version of Apache can be found on the +Apache web server at http://www.apache.org/. This will list the current release, any more recent alpha or beta-test release, together with details of mirror web and anonymous ftp sites.

-

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

-

Compiling Apache for Windows

+You should download the version of Apache for Windows with the +.exe extension. This is a single file containing Apache, +ready to install and run. There may also be a .zip file +containing the source code, to compile Apache yourself. -

Compiling Apache requires Microsoft Visual C++ 5.0 to be properly - installed. It is easiest to compile with the command-line tools - (nmake, etc...). Consult the VC++ manual to determine how to install - them.

+

Installing Apache for Windows

-

First, unpack the Apache distribution into an appropriate - directory. Open a command-line prompt, and change to the - src subdirectory of the Apache distribution.

+Run the Apache .exe file you downloaded above. This will +ask for: -

The master Apache makefile instructions are contained in the - Makefile.nt file. To compile Apache, simply use one of - the following commands:

-

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.

+

-

Apache can also be compiled using VC++'s Visual Studio development - environment. Although compiling Apache in this manner is not as simple, - it makes it possible to easily modify the Apache source, or to compile - Apache if the command-line tools are not installed.

+Important note for 1.3b6 installs: the installer for +1.3b6 will overwrite any existing httpd.conf, +access.conf, srm.conf or +mime.types files in the conf, and will also +overwrite your index.html file in the htdocs +directory. You should copy this files or directories before installing +Apache 1.3b6, or install into a new directory. -

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

+

-

Installing Apache for Windows

+After installing Apache, you should edit the configuration files in +the conf 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 htdocs. There are lots of other options +which should be set before you start really using Apache. However to +get started the files should work as installed. -

Once Apache has been compiled, it needs to be installed in its server - root directory. The hard-coded default is the \Apache - directory, on the current hard drive. Another directory may be used, - but the files will need to be installed manually.

+

Running Apache for Windows

+ +There are two ways you can run Apache: -

To install the files into the \Apache directory - automatically, use one the following nmake commands (see above):

-

This will install the following:

+To start Apache as a service, you first need to install it as a +service. Run the "Install Apache as Service" option from the Start +menu. Once this is done you can start Apache by opening the Services +window (in the Control Panel), selecting Apache, then clicking on +Start. Apache will now be running in the background. You can later +stop Apache by clicking on Stop. As an alternative to using the +Services window, you can start and stop Apache from the control line +with - +
+  NET START APACHE
+  NET STOP APACHE
+
-

If you do not have nmake, or wish to install in a different directory, - be sure to use a similar naming scheme.

+To run Apache from a console window, select the "Apache Server" option +from the Start menu. This will open a console window and start Apache +running inside it. The window will remain active until you stop +Apache. To stop Apache running, press Control-C within the console +window. + +

+ +After starting Apache running (either in a console window or as a +service) if will be listening to port 80 (unless you changed the +Port, Listen or BindAddress +directives in the configuration files). To connect to the server and +access the default page, launch a browser and enter this URL: + +

+  http://localhost/
+
+ +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 +error_log file in the logs directory. -

Using Apache for Windows

+

-

The first step is to set up Apache's configuration files. Default - configuration files for Windows are located in the conf - subdirectory in the Apache distribution, and are named - httpd.conf-dist-win, access.conf-dist-win - and srm.conf-dist-win. Move these into - \Apache\conf, and rename them httpd.conf, - access.conf and srm.conf, respectively.

+Once your basic installation is working, you should configure it +properly by editing the files in the conf directory. -

Configuring Apache is nearly identical to the Unix version of Apache, - so most of the standard Apache documentation is - applicable. A few things are, however, different, or new:

+

Configuring Apache for Windows

+ +Apache is configured by files in the conf +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 Apache documentation for all the +available directives. + +

+ +The main differences in Apache for Windows are:

-

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

Running Apache for Windows from the Command Line

+ +The Start menu icons and the NT Service manager can provide an simple +interafce for administering Apache. But in some cases it is easier to +work from the command line. + +

+ +When working with Apache it is important to know how it will find the +configuration files. During installation, a registry key will have +been installed called: -

Apache can be executed in one of two ways, directly from the command - line, or as a Windows NT service. To run it from the command line, use - the following command:

-    C:\Apache> apache -s
+  HKEY_LOCAL_MACHINE\Software\Apache Group\Apache\1.3 beta\ServerRoot
 
-

Apache will then execute, and will remain running until it is - exited. To use Apache as a Windows NT service, use the following:

+The value of this key is the "ServerRoot" directory, containing the +conf directory. When Apache starts it will read the +httpd.conf file from this directory. If this file +contains a ServerRoot 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 ServerRoot +directory in the httpd.conf file to the new location. + +

+ +To run Apache from the command line as a console application, use the +following command: + +

+    apache -s
+
+ +(The -s option is not required by Windows 95, but on Windows NT it +prevents Apache waiting to see if Apache is running as a +service). Apache will execute, and will remain running until it +is stopped by pressing control-C. + +

+ +To install Apache as a Windows NT service, use the following: + +

+    apache -i
+
+ +and to remove the Apache service, use +
-    C:\Apache> apache -i
+    apache -u
 
-

Then open the Services control panel, and start the Apache service.

-

If you installed Apache in a server root other than - \Apache, you must use the -f command-line - option to specify the httpd.conf file, or the -d option - to specify the server root.

+If you want to run an installation of Apache in a directory other than +the one in the registry key as above, use the -f +command-line to specify the path to the httpd.conf file, +or the -d option to specify the server root +directory. These options can be used with any of the other flags as +listed above. Again note that once Apache has read the +httpd.conf file it will then start using the directory +given on the ServerRoot directive line instead of the -f +or -d command line argument. + +

Compiling Apache for Windows

+ +

Compiling Apache requires Microsoft Visual C++ 5.0 to be properly + installed. It is easiest to compile with the command-line tools + (nmake, etc...). Consult the VC++ manual to determine how to install + them.

+ +

First, unpack the Apache distribution into an appropriate + directory. Open a command-line prompt, and change to the + src subdirectory of the Apache distribution.

+ +

The master Apache makefile instructions are contained in the + Makefile.nt file. To compile Apache, simply use one of + the following commands: +

+ +

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.

+ +

Apache can also be compiled using VC++'s Visual Studio development + environment. Although compiling Apache in this manner is not as simple, + it makes it possible to easily modify the Apache source, or to compile + Apache if the command-line tools are not installed.

+ +

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

+ +

Once Apache has been compiled, it needs to be installed in its server + root directory. The default is the \Apache + directory, on the current hard drive.

+ +

To install the files into the \Apache directory + automatically, use one the following nmake commands (see above):

+ + +The dir argument to INSTDIR gives the installation directory. The can +be omitted if Apache is to be installed into \Apache. + +

This will install the following:

+ + + +

If you do not have nmake, or wish to install in a different directory, + be sure to use a similar naming scheme.

-- 2.40.0