Enabling Apache and IIS on your Windows 7 machine

Are you a web programmer who develops applications that run on both Apache and IIS? Are you looking for installation instructions? Or are you looking for instructions on how to have both server technologies to run at the same time?

If you, like me, came from a environment where majority of your web development was done using Open Source Technologies such as  Apache, PHP, etc., then you most likely have already setup your machine to have Apache running on it. However, if you have recently transitioned to developing web applications running Microsoft Technologies such as IIS, ASP.NET, etc., then you will have to setup your machine so that IIS is running when you are debugging your apps.

The problem is both server systems cannot peacefully co-exist if you follow their respective default installation process. You will have to make some changes to one of them, so that both can run at the same time. For me, configuring Apache was much easier since I have been doing that for a very long time.

Installing IIS on a machine where Apache is already installed

Here is a list of steps to follow to enable both Apache and IIS on your Windows 7 Machine. (If you are using some other Operating System and the steps here did not do the trick, then leave a comment and I will find out a way of getting it done on your machine.)

  1. Stop your Apache service: Start -> Type in “services.msc” -> Look for Apache -> right click on it and select stop.
  2. Install IIS (if you haven’t already): Control Panel -> Programs -> Turn Windows features on or off -> Check the box for Internet Information Services (IIS)
  3. Find the location of Apache folder on your computer. Typically this would be C:\Program Files\Apache Software Foundation\
  4. Once you are in your Apache folder, go to folder called “conf”.
  5. In there open file called “httpd.conf”.
  6. Once you opened “httpd.conf”, find “Listen 80”. Change this to “Listen 81”. Basically, you are changing the port on which Apache will be accepting all requests. Traditionally, all Web Servers listen to port 80 because 80 has been defined as the port where all http requests will coming in from.
  7. Save this file. (You have some issues saving this file because you need administrator privileges to modify this file. Here is one possible solution: Start -> All Programs -> Accessories -> Right click on Notepad -> “Run as administrator”. Find the path to “httpd.conf” on your machine and open it from Notepad. Make changes and save it.
  8. Start your Apache service: Start ->¬†Type in “services.msc” -> Look for Apache -> right click on it and select start.
Installing Apache on a machine where IIS is already installed
  1. Stop IIS: Start -> Control Panel -> System and Security -> Administrative Tools -> Internet Information Services (IIS) Manager -> In the right most pane called “Actions”, click on “Stop” under “Manage Server”.
  2. Install Apache.
  3. Follow all the steps from “Installing IIS on a machine where Apache is already installed” except for step 2.
If you experienced any problems, leave a comment and I will get back to you.

One Comment

Add a Comment

Your email address will not be published. Required fields are marked *