Binding IIS v6 on win2003 to certain IPs so that Apache can bind to another IP both on port 80? - 500pts

Binding IIS v6 on win2003 to certain IPs so that Apache can bind to another IP both on port 80? - 500pts\

I would like both apache and IIS to run on my windows 2003 server and both on port 80. Can I configure IIS to only bind to certain IP addresses, so it won't conflict when I try to start up Apache on a particluar IP address? If so, how?  
apm825Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Guy Hengel [angelIII / a3]Billing EngineerCommented:
on this thread someone posted a solution:
http://forums.devarticles.com/archive/t-5069/can-IIs-and-apache-run-on-the-same-machine

I managed to get it working:

In this case the problem was that IIS 6.0 has a feature called Socket Pooling that claims all ports for all loaded IP addresses, even if not configured in IIS.

So, IIS was hogging port 80 on the IP address I'd designated as the Apache address and causing it to not run. I installed Windows 2003 and got IIS running. Then I turned off IIS and installed Apache, associating it with the IP and port that I wanted. Then I turned off the Apache service and restarted IIS.

Then, what I had to do was:

1- Extract the httpcfg.exe utility from the support tools area on the Win2003 CD.
2 - stop all IIS services: net stop http /y
3 - have IIS listen only on the IP address I'd designated for IIS: httpcfg set iplisten -i 192.168.1.253
4 - make sure: httpcfg query iplisten (the ip's listed are the only ip addresses that IIS will be listening on and no other)
5- restart IIS Services: net start w3svc

Voila! Apache is listening on its default ports on 192.168.1.254 and IIS is listening on its default ports on 192.168.1.253.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
apm825Author Commented:
it seems iis by default listens to all ips and is called socket pooling.

disabling socket pooling between IIS5 and IIS6 is done differently: http://support.microsoft.com/kb/q238131/
Guy Hengel [angelIII / a3]Billing EngineerCommented:
Actually, that article also clearly says (IIS6): To configure HTTP.sys, you must use Httpcfg.exe.
and points to this article:
http://support.microsoft.com/kb/813368/EN-US/
which is the same procedure as the posted above...
CompTIA Network+

Prepare for the CompTIA Network+ exam by learning how to troubleshoot, configure, and manage both wired and wireless networks.

apm825Author Commented:
yeah! thanks. I think we were typing at the same time....going to try here in a sec, but i'm almost sure this is it. thanks!
apm825Author Commented:
i just did all of that and its still listening to all those ip addresses. I have like 20+ ip addresses on my server. I have 2 or 3 web apps that are assigned to *all unassigned*. Do you think this would keep it listening to those other ports?
apm825Author Commented:
yep! that seemed to work! :-)
apm825Author Commented:
ok, now i'm feeling silly. i had changed apache's config file to another port before when I was troubleshooting it. Once I told it to go for port 80, no dice. I'm thinking shut down iis, start up apache, then start iis. Hope that works.
Guy Hengel [angelIII / a3]Billing EngineerCommented:
Yes, that order should be correct.
If you want to ensure that this start order is also respected at Windows reboot, you will need to make IIS dependant of Apache
apm825Author Commented:
ok, that seemed to work...now i need to install a php or some app and see apache in action.

I'm starting to wonder how I'm going to have to configure this for when the server boots up. Now that I'm typing this, I'm thinking i need to disable the pooling in IIS6 the way you did it in v5. I guess I thoguht that was an iis5 thing.
apm825Author Commented:
>>Yes, that order should be correct.
If you want to ensure that this start order is also respected at Windows reboot, you will need to make IIS dependant of Apache

oh, i never thought of that. Something I think is weird is that apache is not listed in my services console. Is that normal? I would assume I would set up dependencies there.
Guy Hengel [angelIII / a3]Billing EngineerCommented:
apm825Author Commented:
wow, thanks. that was above and beyond. These were excellent answers!
Guy Hengel [angelIII / a3]Billing EngineerCommented:
Glad I could help. Expecting a good grade then when you close the question.
apm825Author Commented:
absolutely! sorry for the delay!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft IIS Web Server

From novice to tech pro — start learning today.