Apache 2.0 runs on most Windows platforms and offers increased performance and stability over the 1.3 versions for Windows. You can build Apache from source, but because not many Windows users have compilers, this section deals with the binary installer.
Before installing Apache, you'll probably want to make sure that you are not currently running a Web server (for instance, a previous version of Apache, Microsoft Internet Information Server, or Microsoft Personal Web Server) in your machine. You might want to uninstall or otherwise disable existing servers. You can run several Web servers, but they will need to run in different address and port combinations.
Before downloading the installer, take a momenta very important momentand look for a statement on the downloads page (found at http://httpd.apache.org/download.cgi) that says If you are downloading the Win32 distribution, please read these important notes. The direct URL to these notes is http://www.apache.org/dist/httpd/binaries/win32/README.html.
The Apache Software Foundation maintains this page for the benefit of all Windows users who want to run a version of the Apache server. On this page, there are notes for nearly every flavor of Windows still in use, and as such it will be in your best interest to read the information that is presented. I guarantee that if you are running Apache either as a production or development server, you find relevant information on the notes page.
Once you're ready to begin the installation, look for the link labeled Win32 Binary (MSI Installer). After you download the installer, double-click on the file to start the installation process. You will get a welcome screen, as shown in Figure 3.1.
Figure 3.1. The Windows installer welcome screen.
Select Next to continue the installation process, and you will be prompted to accept the Apache license. Basically the license says that you can do whatever you want with the softwareincluding making proprietary modificationsexcept claim that you wrote it, but be sure to read the license so that you fully understand the terms.
After you accept the license, the installer presents you with a brief introduction to Apache. Following that, it asks you to provide basic information about your computer, as shown in Figure 3.2. This includes the full network address for the server (for instance, mycomputer.mydomain.com) and the administrator's email address. The server name will be the name that your clients will use to access your server, and the administrator email address will be added to error messages so that visitors know how to contact you when something goes wrong.
Figure 3.2. The basic information screen.
By the Way
If your machine does not have a full network address, use localhost or 127.0.0.1 as the server name.
In the next step, you can choose to install Apache as a service or require it to be started manually. Installing Apache as a service will cause it to run every time Windows is started, and you can control it through the usual Windows service administration tools. Select this option if you plan to run Apache in a production environment or otherwise require Apache to run continuously. Installing Apache for the current user will require you to start Apache manually and set the default port on which Apache listens to requests to 8080. Choose this option if you use Apache for testing or if you already have a Web server running on port 80.
The next screen enables you to choose the type of installation, as shown in Figure 3.3. Typical installation means that Apache binaries and documentation will be installed, but headers and libraries will not. This is the best option to choose unless you plan to compile your own modules.
Figure 3.3. The installation type selection screen.
A custom installation enables you to choose whether to install header files or documentation. After selecting the target installation directory, which defaults to c:\Program Files\Apache Group, the program will proceed with the installation process. If everything goes well, it will present you with the final screen shown in Figure 3.4.
Figure 3.4. The successful installation screen.
In the next section, you'll learn about the Apache configuration file, and eventually start up your new server.