Binding Apache and IIS both to Port 80 on Different IPs / Same NIC

If you need to run IIS 6.0 and Apache 2.2.* side-by-side on the same Windows server machine, you most likely are trying to bind apache to one IP address and IIS to another.  If you have multiple IPs bound to the same NIC, this will only work if you do some tweaking to IIS’s metabase via httpcfg.exe

The httpcfg utility is found on the installation CD in the Suppot/Tools directory in the Support.cab file (you can use WinRAR or the like to extract it).

Once you have httpcfg on your system, you force IIS to bind only to specified IP addresses with a command like:

httpcfg set iplisten -i xxx.xxx.x.x

Here’s the KB that shows in detail you how to get it done:

http://support.microsoft.com/kb/813368/EN-US/

Hope this helps!

This entry was posted in Apache, IIS. Bookmark the permalink.

One Response to Binding Apache and IIS both to Port 80 on Different IPs / Same NIC

  1. IIS7.5 says:

    With IIS 7.5, do the following at a command prompt:

    netsh
    http
    sho iplisten (shouldn’t have any bindings)
    add iplisten ipaddress=X.X.X.X (where x.x.x.x is your ip address you want to bind to)
    sho iplisten (you should now see x.x.x.x in the list)
    exit

    Then you netstat to verify:

    netstat -an

    You should see x.x.x.x:80 in the list now

Leave a Reply

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