In order to install the Apache HTTPD web server software on Windows 7, you must do a couple of different things.
- Download & install the Apache software.
- If you want to serve content to other computers on your network, allow port 80 traffic through the Windows Firewall.
- If you want to serve content out to the public, you must also allow the port 80 traffic through your router and direct it to the right machine.
Download & install Apache
Visit httpd.apache.org and choose to download the software from a mirror. Choose the latest stable version, unless you need an older one for some reason. Download one of the Win32 Binary releases (one comes with Open SSL and the other does not).
Apache for Windows comes as a self-installing MSI package. Run the installer, answer the questions it asks, and you’ll be set up with a basic web server configuration on your Windows 7 machine.
At this point, you can open up a web browser and go to http://localhost or http://127.0.0.1 and see a testing page letting you know that the server works. Place the content you wish to serve in the c:Program FilesApache Software FoundationApache[x.x]htdocs folder.
Allow port 80 traffic through Windows Firewall
If you want to make requests from another machine on your network, you need to configure Windows firewall to allow those connections. In Windows 7, this is done by going to Start → Control Panel → System & Security → Windows Firewall → Advanced Settings → Inbound Rules → New Rule. Create a port rule for TCP over port 80. Here’s a more detailed description of the process.
Name the rule for Apache.
Now you can enter the IP of your server into the address bar of a web browser on another one of your computers and get content from Apache. If you don’t know the local IP of the Apache machine, there are two ways to get it:
- From your computer: Get your internal IP from the command prompt. It will probably begin with “192.168.”.
- From your router: Log into your router’s control panel and find an option that shows you all the connected clients. On many Linksys routers, you can obtain a list of IPs from the DHCP Clients Table.
Allow Apache traffic through your router
If you want to serve content out to the public, you must allow Apache’s port 80 traffic through your router. The process for doing this is different depending on your router manufacturer. If you have a Linksys router, the process is probably as follows:
- Log into your router’s control panel.
- Go to Security.
- Un-check “Block anonymous Internet requests”.
- Click “Save”.
- Go to Applications & Gaming.
- Enter the following information:
- Application: Apache
- Start: 80
- End: 80
- Protocol: Both
- IP Address: The same internal IP you obtained earlier.
- Check off “Enable”.
- Click “Save”.
Be aware that there are risks inherent with allowing the outside world through your router’s firewall. If you misconfigure something, you might inadvertently make private information available to the public.