Monday, February 28, 2011

IIS6 and Apache: Together At Last

I knew of course that you can't have two web servers on the same machine using the same socket, but when a client said that they had a multi-homed server I figured we could easily set Apache to bind to one socket, and IIS to another. Problem solved.

Hahaha. Just kidding.

It can be really frustrating to make what seems like a simple configuration change and have it not work. You double-check the syntax of httpd.conf, you do a netstat, you check the websites under IIS, and everything tells you that you have a textbook setup (if you can call running two webservers on the same machine textbook, but we won't get into that), but it doesn't work.

Turns out that IIS, sneaky bugger, insists on binding to all available IPs, regardless of what you set up in IIS Admin.  You actually have to perform additional steps to get this setup to work. You first have to disable socket pooling, as per this KB article. This may work right off, but if it doesn't you then have to explicitly tell IIS what IP to use by using the httpcfg tool, which is included in Microsoft's Support Tools, as described here.

Pretty interesting. 

No comments:

Post a Comment