Apache on Windows XP

If you design websites you might want to install a web server on your computer in order to test your sites in an environment that matches the real thing as close as possible. This article describes how to install and configure the open-source Apache HTTP (web) server and how to make it work with not one site but as many as you require using a technique called name-based virtual hosting.

Go to the Apache HTTP server download page and select the series you want to use (either 1.3 or 2.0) and download the Win32 binary. In my case I
After you have downloaded the MSI file compare the MD5 signature with the value published on the Apache website. Note: I am working on an explanation on how to do this, for now read the instructions on the Apache HTTP server download page.

Installing and configuring Apache on Windows XP: Virtual Hosts

Installing the Apache web server

If you set up your day-to-day account properly on Windows XP you are working as a limited user. For installation of the Apache HTTP server you need to have Administrator rights. So go to the Windows XP Login screen by pressing the Windows key (between the left Ctrl and left Alt on most keyboards) and the L key together.

When started, the Apache HTTP server installation wizard displays a welcome message. Click on the Next button to continue. Next, the Apache license is shown. Read it carefully and if you accept the license, select the “I accept the terms in the license agreement” option and press the Next button.

Next a “Read This First” document is displayed. Read it carefully before pressing the Next button.

Apache

Installing and configuring Apache on Windows XP: Virtual HostsNext, you can enter your server information. Since I don’t need other computers on the local network to be able to contact the web server I used localhost. If you have a local network, and want other computers to be able to contact the computer, make sure you use the right settings. If you don’t know which option you want, use localhost for now, since you can always change the configuration settings later on in the configuration file of the Apache web server.

I recommend to run the Apache HTTP server as a service. This way it is always running and you don’t need to start it manually. If you consider manually start and stop because of security issues, then reconsider and use a firewall, preferable one running on an external device like a router.

The next step allows you to select the install type of the Apache web server. The default (Typical program features) is probably right for your situation, so press Next.

Next, you can select the destination folder of the installation. Unless you prefer to use a different folder for some or all of the software you install, I recommend to use the default setting: C:\Program Files\Apache Group\

Finally, after clicking on the Next button you can start the actual installation by pressing the Install button. A few windows pop up and go automatically, and then a Windows Security Alert window appears asking if you want to keep blocking this (Apache HTTP server) program.

Apache

Since I don’t want to make the web server available on the network I selected the Keep Blocking option. Note that you can always change this into Unblock later in case you decide to make the Apache HTTP server available on your network. After selecting a button in the Windows Security Alter dialogue window the window closes itself and the Apache HTTP Server 2.0 Installation Wizard reports that the Apache HTTP server has been installed successfully. Click the Finished button to close the HTTP server installation wizard.

Installing and configuring Apache on Windows XP: Virtual Hosts

Testing the Apache HTTP server installation

In order to test your Apache web server installation, open a browser and enter http://localhost/ into the address bar (unless you used a different value then localhost in the Apache server information step). The Test Page for Apache installation should be displayed into your browser.

Apache

Installing and configuring Apache on Windows XP: Virtual HostsIf you don’t get the test page it might be that the Apache web server was not able to start for some reason, check the error.log file in the logs folder of the web server (see the next section).

Understanding the Apache server folder structure

It is important to understand some part of the Apache HTTP server folder structure, or where is what located. I won’t describe each and every item, but just mention the important ones:

Apache

Installing and configuring Apache on Windows XP: Virtual Hosts

Stopping and starting Apache

After changes have been made to the httpd.conf file and/or the virtual-hosts file, Apache has to be restarted. If you are logged in with Administrator rights the easiest way to do this is by using the Apache monitor which is started when you log in and available via the system tray. Click the right mouse (context menu) button on the red feather icon in the system tray and select the Open Apache Monitor menu entry. You can restart the Apache HTTP server with a single mouse click on the Restart button.

Apache

Reblog this post [with Zemanta]

Comments

  1. I found your site on faves.com bookmarking site.. I like it ..gave it a fave for you..ill be checking back later

  2. naruto says:

    thank you sir, I have read your article and follow all of steps to download and install Apache web server. That is why I accommodate it into my website

    Silahkan kunjungi juga blog naruto dgn judul posting .. How To Install Apache Web Server Into PC

  3. dikma.web.id is very informative. The article is very professionally written. I enjoyed reading dikma.web.id.