By using this site you agree to the use of cookies by Brugbart and our partners.

Learn more

Installing Apache on Windows

How to install and configure Apache HTTP server on Windows based systems, and how to access your server from anywhere on its WAN IP.

Edited: 2015-12-03 13:09

This Tutorial covers how to install Apache HTTP Server in windows xp. Begin by downloading the 2.2 version of apache, and get started. The latest working link as of the writing of this was found at Downloading the Apache HTTP Server Page

Installing Apache

Apache Installation Tutorial

The first step after downloading the MSI Installer, is the license agreement, check the agreement radio button and hit next.

Next we have the Read This First dialog, simply hit next, and we are ready to install.

Server Information

In the Server Information dialog simply enter localhost in both the Network Domain and Server Name input fields. As for the administrator mail, simply enter your email. See below:

Apache Installation: Server Information Dialog

I recommend you install Apache as a Service.

Setup Type and Destination Folder

Simply chose the Typical option and hit next, you can chose another folder as well if you want. Now let the MSI finish the installation.

The root of apache is named htdocs by default, and this is also where your index.html file is located. You find htdocs in the apache directory.

Trying if it Works

In the address bar of your browser, enter http://localhost/, you should now get a message that it worked. Other computers on your LAN can now access your server by entering your local IP in their browser address bar like above, I.e.

The next Tutorial is Installing PHP with Apache on Windows

Access your Server on your WAN IP

If you can't already access your server, then you most likely need to forward a port in your routher, so that it points to the LAN ip of the computer running the server.

Configuring the TCP/IP settings

Its recommended to configure the LAN and DNS manually for all devices on the LAN, to avoid cases where the routher would assign you the wrong LAN IP, and conflicts with devices which get their IP assigned automatically by the routher. Below are some example settings that you can use, simply use,, etc for other devices as needed.

Ip address:
Subnet mask:
Default gateway:

Preferred DNS server:
Alternate DNS server:

Note. The above DNS servers are provided as a free service by OpenDNS.

Your routher may use the address, check your routher manual if you cant connect with these settings, you may want to use the DNS provided by your ISP, this can easily be found either by contacting them and asking what it is, or searching for it on google I.e. "ISPNAME DNS"

Setting the listen Port

Open up httpd.conf and change the listen port so it corresponds with the one you forwarded in your routher, consult either your ISP or routher manual if you need help forwarding the port.

Video Tutorial

The following video walkthrough will walk you through the setup process, show how to configure the Apache HTTP Server, and add an exception to windows firewall.