Setup Apache On Windows

Share This:

Just like everything else pertaining to Microsoft & Windows installing Apache HTTPD on Windows to host websites is easy as well. To install Apache on Windows you will first obviously need a computer that has Windows installed on it. Then you will need to download the Apache Server software from the Apache website.

Once you have done this you are ready to install it. Just click on the Apache installer and follow the instructions. Because your using Windows you can start Apache with your mouse. So their is no need to type any commands to start it up. So lets start Apache Server. To start it we will do the following.

Windows XP & Earlier

Start > All Programs > Apache HTTP Server > Control Apache Server > Start

Windows Vista & Newer

Start > Programs > Apache HTTP Server > Control Apache Server > Start

Next we can test it out. To do this we will open up our web browser and in the address bar we will type localhost, This will display the Apache Test page that says the words It Works.

Now we can test it out on another computer on our network. But to do this we will first need find out the servers IP address. To do this we will open up the Windows command prompt by doing the following.




Windows XP & Earlier
Start > All Programs > Accessories > Command Prompt
Windows Vista & Newer
Start > Programs > Accessories > Command Prompt
Once the command prompt window is opened up we will type the following.

ipconfig

The above command should have an out put similar to the following.

Connection-specific DNS Suffix . : domain.com
IP Address. . . . . . . . . . . . : 10.0.2.15
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 10.0.2.2

We now know what our servers IP Address is on the network. So we can go to another computer on our network and fire up our favorite web browser. Then we will type the servers IP address in to the browser address bar. So in our case we would type 10.0.2.15 into our web browsers address bar. We should see the same Apache Test Page. If we don’t you may want to go to the server and make sure the firewall is not blocking Port 80 or Port 8080.

Once the ports are unblocked you may want to restart the Apache Web Server. Then try to go to the test page again on the other computer on your network.




Now lets try testing it on a computer outside of our network. To do this we will need to find out our external IP Address. The easiest way to do this is to go to the IP Chicken website. It will tell you the IP Address of your server. Once you know it go outside of your network and type the IP Address of your Apache Server into the web browser address bar. You should see the Apache Test page. If you don’t you will need to make sure your router isn’t blocking Port 80 or Port 8080.

To check this you will login to your router by typing in the routers address into your web browser address bar. The routers IP address is known as the Gateway IP address. When we issued the ipconfig command earlier we saw the routers IP address was 10.0.2.2. So that is what we will type. Now we can tell the router to stop blocking port 80 and port 8080.

Once we have made changes to our router we will check again on a computer outside of our network. If all goes well we should see the Apache test page.

Tweaks

Instead of rewriting the same content I’ve written the past for Linux Systems I will simply list the different Apache tweaks and give the links to the post. The tweaks are almost identical on Windows as they are on Linux.

Host Multiple Websites (On Windows Systems the httpd.conf file is called httpd.conf and can be located in the %PROGRAMFILES%\Apache Software Foundation\Apache2.2\conf, you can use any text editor to edit it)