Running IIS and Apache on the same Windows 2003 server
Today I was working on server and need to run Apache v2.2 and IIS6 on the same Windows 2003 server. Whenever I would try to start the Apache service with any Virtual Host and listener configured to port 80, it would give me an error like the following in the Windows Event Viewer:
The Apache service named reported the following error:
>>> (OS 10013)An attempt was made to access a socket in a way forbidden by its access permissions. : make_sock: could not bind to address 127.0.0.1:80 .
It was then followed up with another error message:
The Apache service named reported the following error:
>>> no listening sockets available, shutting down .
It turns out that IIS automatically listens to port 80 on all bound IP addresses. Microsoft's Support KB offers detailed instructions on setting up an IP inclusion list which will make IIS only listen to port 80 for the IP addresses you specify.
These steps involve installing the Windows Server 2003 Support Tools as you need the httpcfg.exe tool that comes in the package.
Once you've got the Support Tools installed, the steps are pretty easy:
- Click the "Start" button and go to the "Run" option.
- Type "cmd" and hit [ENTER].
- Type "cd \path\to\support tools\" and press [ENTER].
- Type "httpcfg set iplisten -i xxx.xxx.xxx.xxx" and press [ENTER] (where xxx.xxx.xxx.xxx is the IP address to add to the inclusion list.)
- Repeat the above step for each IP address you want to add.
- Next, type "net stop http /y" and press [ENTER] to stop the HTTP service.
- Finally, type "net start w3svc" and press [ENTER] to restart IIS services.
NOTE:TIP: Remember you can press the [TAB] key to cycle through directory names once you start typing a path. This saves lots of typing.
Once you this is done, you should be able to configure Apache to listen on any IP address that's not in your inclusion list for IIS.

Comments
Great article -- I have an issue now were we have some php code which really needs to run under Apache (all our existing is IIS). Do you think though, out of curiosity, that we could run ColdFusion8 on both webservers (Apache & IIS) from a single instance/install?
Regards,
Jeremy
I have no idea if you can connect to multiple web server from the same CF instance. I've never had a reason to try it.