[APACHE DOCUMENTATION]

Apache HTTP Server Version 1.3

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 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 bug reporting page.

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.



Requirements

Apache 1.3b3 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 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

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).

Installing Apache for Windows

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.

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

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.

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.

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:

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).

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

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

    C:\Apache> apache -i

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.


Apache HTTP Server Version 1.3

Index