Running IIS and Apache on the same server
You can not have two services offered on the same ip and port numbers.
On the same server, different services (IIS and Apache) need a unique IP/Port combination.
1) IIS might be binding to all ips on port 80. This has been the standard behavior of IIS since many years. So to run Apache with IIS, you first need to make sure IIS does not bind (i.e. listen) on all ips. The following article will help you disable IIS 6 from automatically binding to all ips on the Windows 2003 Server.
Before IIS6 (i.e IIS5), you simply had to set the metabase property "DisableSocketPooling"
to true (and that was it).
For details on doing this see: Disable socket pooling on IIS5
Once you do that on IIS 6, you also have to specifically declare which ip to listen on (On IIS 4 or IIS 5 this step was not required).
Under IIS6 you need to also manually add all the ips it should listen to, using
the support tool httpcfg (see download link at bottom), like so:
httpcfg set iplisten -i xxx.xxx.xxx.xxx
With xxx.xxx.xxx.xxx being an ip like: 18.104.22.168
To list the "listened to" IIS6 ips: httpcfg query iplisten
Note: You need a IIS restart, at a minimum, to validate httpcfg changes.
I still set the DisableSocketPooling to true on IIS6 and rebooted to make it work. Looks like the binding with IIS might be very low level (kernel) and a reboot is best to make sure the changes are in effect.
To remove an ip:
httpcfg delete iplisten -i xxx.xxx.x.x
2) For Apache usable ips use the directive:
Note: The httpcfg command settings should be visible under the registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HTTP\Parameters\ListenOnlyList and you should never have to directly modify the registry. If however the httpcfg seems unable to correctly set or remove ips you might have to clean up the registry ListenOnlyList value. For details, see Microsoft KB 890015