Running IIS and Apache Together On the Same Server at the Same Time

It is possible to run both IIS and Apache on the same Windows machine, both using port 80 (http) and 443 (https), without any start-up or conflict issues.

To do this, you simply configure IIS and Apache to use different interfaces (i.e., IP addresses) with: one web-server binding on the Public IP address, and the other web-server binding on 127.0.0.1 (local host). Depending on your situation and needs, you can also assign the LAN IP to either IIS or Apache (…just ask yourself which web-server do you want reachable on the local/internal network?).

This way you’ll have both web-servers, and their hosted websites, using standard ports (with no need to use non standard URLs), just on different IPs.

With this method (for example), you could keep your existing IIS websites in production, while at the same time developing on and/or migrating to Apache (which is accessible on the local host). Later, you can move Apache to production by re-binding it.

1. Rebind all IIS websites (including “Default Web Site”) from “*” and “0.0.0.0” (“0.0.0.0″ means all IPs the system has) to the Public IP address… Select each website one by one, and in the Action pane, click Bindings.

2. Bind Apache from 0.0.0.0 to 127.0.0.1 per these simple instructions…
Binding Apache to a Specific Or Secondary IP Address

Note that when you install a WAMP server such as WampDeveloper Pro, it will stop the IIS Service and change its “Startup Type” from “Automatic” to “Disabled”…

To minimize production downtime, after WAMP installation –

  1. Stop Apache.
  2. Go into Services (run services.msc), select the IIS Service (W3SVC / “World Wide Web Publishing Service”), change its startup type back to “Auto”, and start it.
  3. Rebind all IIS websites to the public IP address, and restart IIS.
  4. Rebind Apache to 127.0.0.1 per the above instructions, and start it.

6 thoughts on “Running IIS and Apache Together On the Same Server at the Same Time”

  1. If installing .NET 3.5 on Server 2008 or 2012 that already contains .NET 4 and uses IIS and ASP.NET for existing websites, it has been reported that in some situations and configurations, the .NET 3.5 installation might cause the ASP.NET websites to fail.

    It is possible that asp.net gets re-registered from 4 to 3.5 (causing issues), or the websites in the application pool are assigned to an incorrect .NET version, or to more than one .NET version (…an application pool can only run one .NET version).

    If this happens, some options are:

    1. Register asp.net for .NET v4:
      aspnet_regiis -i
    2. Check and reset the “Application Pool” for each website:
      Website - Manage Website - Advanced Settings
    3. Run the Microsoft .NET Framework Repair Tool.
    4. Re-install .NET v4 via Windows Features.
  2. I went through various articles but this article hit the nail and really solved my issue with Apache and IIS simultaneous hosting..

    Thanks a lot for the help.

  3. Hello guys, i need information i have to make server machine for my company i need Apache, IIS, MY SQL, MS SQL, SVN Server and FTP server with 500GB hard-disk in single box. We have total 250 users on domain and only 50 users are more active I need this server just for LAN side as it is for testing purpose .please suggest me the hard ware and software requirements for it.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>