Installing Apache on Windows
Apache 2.0 runs on most Windows platforms and offers increased performance and stability over previous 1.3 Windows versions. 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 probably want to make sure that you are not currently running a Web server in that machine, such as a previous version of Apache, Microsoft Internet Information Server, or Microsoft Personal Web Server. 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.
You can download an installer in the MSI format from http://www.apache.org/dist/httpd/binaries/win32.
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, and you will be prompted to accept the Apache license. You can also find a copy of the license in the Apache Software Foundation Web site (http://www.apache.org) and in Appendix A, "Apache License," of this book. Basically the license says that you can do whatever you want with the softwareincluding proprietary modifications except claim that you wrote it.
Figure 3.1 Windows installer welcome screen.
After you accept the license, you are presented with a brief introduction to Apache. Following that, you are asked to provide the installation process with basic information about your computer, as shown in Figure 3.2. This includes the network domain name, the fully qualified domain name (FQDN) for the server, and the administrator's e-mail address. The server name will be the name that your clients will use to access your server, and the administrator e-mail address will be added to error messages so that visitors know how to contact you when something goes wrong. Additionally, you can 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. Choose 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 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. Hour 4 provides further information on the different ways of controlling Apache in Windows.
The following 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.
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, you will be presented with the final screen shown in Figure 3.4.
Figure 3.2 Basic information screen.
Figure 3.3 Installation type selection screen.
Figure 3.4 Successful installation screen.
Notes About the Windows Installer
At the time this book was written, Apache 2.0 did not support Windows consumer platforms such as Windows 95 and Windows 98. The Apache developers will concentrate on the server platforms such as Windows 2000 and Windows XP, and when Apache has been optimized for these platforms, they might attempt to support consumer versions of Windows.
Additionally, the current releases of the installer at the time of writing did not contain support for encryption, although future releases will likely include the OpenSSL libraries by default. Hour 17, "Setting Up a Secure Server," explains the SSL protocol.