This document explains how to install, configure and run Apache 1.3b6 and 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.
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.
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.
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 releases, together with details of mirror web and anonymous ftp sites.
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. (If there is
no .zip file, the source will be available in a
.tar.gz file but this will contain Unix line endings. You
will have to convert at least the .mak and
.dsp files to have DOS line endings before MSVC will
understand them).
\Program Files\Apache Group\Apache
although you can
change this to any other directory)
During the installation, Apache will configure the files in the conf directory for your chosen installation directory. However if any of the files in this directory already exist they will not be overwritten. Instead the new copy of the corresponding file will be left with the extension .default. So, for example, if conf\httpd.conf already exists it will not be altered, but the version which would have been installed will be left in conf\httpd.conf.default. After the installation has finished you should manually check to see what in new in the .default file, and if necessary update your existing configuration files.
Also, if you already have a file called htdocs\index.html then it will not be overwritten (no index.html.default 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).
Important note for 1.3b6 installs: the above only applies for 1.3b7 and later. In 1.3b6 the installer would 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 these files or directories before installing Apache 1.3b6 or install into a new directory.
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 quickly the files should work as installed.
NET START APACHE NET STOP APACHETo 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.
Once your basic installation is working, you should configure it properly by editing the files in the conf directory.
The main differences in Apache for Windows are:
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