Home > Articles

  • Print
  • + Share This
This chapter is from the book

Installing Apache on Windows

Apache 2.0 runs on most Windows platforms and offers increased performance and stability over the Apache 1.3 versions for Windows. You can build Apache from source, but because not many Windows users have compilers, this section deals with the MSI installer version.

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) on your machine. You might want to uninstall or otherwise disable existing servers. You can run several web servers, but they must run in different address and port combinations.

Before downloading the installer, take a moment—a very important moment—and 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 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.

When you're ready to begin the installation, look for the link labeled Win32 Binary (MSI Installer). After you download the installer, double-click the file to start the installation process. You will get a welcome screen, as shown in Figure 3.1.

03fig01.jpg

Figure 3.1 The Windows installer welcome screen.

Click 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 software—including making proprietary modifications—except 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 is the name 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.

03fig02.jpg

Figure 3.2 The basic information screen.

Also on this screen, you are prompted to select which installation shortcuts should be installed—those for starting Apache as a service or those for starting Apache manually. Installing Apache as a service causes it to run every time Windows is started, and you can control it through the standard Windows service administration tools. Installing Apache for the current user requires you to start Apache manually and set the default port on which Apache listens to requests to 8080 (instead of 80). Select the appropriate radio button and click Next to continue.

The next screen enables you to choose the type of installation, as shown in Figure 3.3. A 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.

03fig03.jpg

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.

03fig04.jpg

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.

  • + Share This
  • 🔖 Save To Your Account