Rob Gonda's Blog

IIS + Apache, side by side happy together

IIS and Apache running side by side ... why? Well, for me, because I run SVN through Apache in a Windows box. I still like IIS for web sites, especially because I like to keep it similar to my production sites... however, I blogged before about getting multiple SVN repositories working with Apache. I usually switched Apache to listen to an alternate port because IIS binds itself to all port 80 on all IPs, regardless if they are actually being used or not. Good news! I found this Microsoft support document explaining how to unbind IIS from all IPs and include only the ones you want. I know, I actually never even looked for this before, but I have IIS serving my sites and Apache server SVN in the same server, both on port 80. Of course, you can also use this for hosting Trac (easier in Apache than IIS), or even just testing ... By the way, if you don't have the Windows Server CD handy, you can download the Support Tools here.
So, after installing the Support Tools, follow these instructions from the M$ site:

To add an IP address to the IP inclusion list
1.    Click Start, and then click Run.
2.    Type cmd, and then click OK to open a command prompt.
3.    Type the following, where is the IP address you want to add:
httpcfg set iplisten -i
When this succeeds, Httpcfg returns the following:
HttpSetServiceConfiguration completed with 0

To view additional status codes, see the Httpcfg help.
4.    After the IP address is added, use the following command to list it:
httpcfg query iplisten
Httpcfg returns the following:
5.    From the command prompt, stop the HTTP service and its dependent services. To do this, type the following string at the command prompt:
net stop http /y
6.    From the command prompt, restart the HTTP service and it dependent services. To do this, type the following string at the command prompt:
net start w3svc
Note When you start w3svc, all services that were stopped when HTTP was stopped will start.

There are no trackbacks for this entry.

Trackback URL for this entry:

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
I am trying to get this working so I can authenticate Active Domain IDs to the SVN server - an endeavor that seems out of my league. Can you help me find resources on that, per chance?
# Posted By Jon | 9/17/08 6:22 PM
It worked like a charm for me. Thanks a lot for sharing.
# Posted By Javier Callico | 6/4/09 9:03 PM
This blog is running version 5.9.003. Contact Blog Owner