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 xxx.xxx.x.x is the IP address you want to add:
httpcfg set iplisten -i xxx.xxx.x.x
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:
IP :xxx.xxx.x.x
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.

TrackBacks
There are no trackbacks for this entry.

Trackback URL for this entry:
http://www.robgonda.com/blog/trackback.cfm?2D83BEF7-98BA-AAF0-16A4876B37377B86

Comments
Have you tried SVN-IIS?

http://www.svniis.org/

--j
# Posted By Jim | 5/27/08 11:24 PM
@Jim, I had not, thanks for the link. It seems like you still need an Apache server and it pretty much just proxies a site to it, so not sure why it would be helpful other than the fact I can leave Apache running in a different port, or re-using an existing SSL ... Nevertheless, I do like that they state that the ultimate goal is to remove Apache from the game ... Thanks again, I'm sure I'll find use for it soon.
# Posted By Rob Gonda | 5/27/08 11:34 PM
Nice to see u blogging again Rob. Great tip especially since I'll be setting up a SVN repo soon. Might need to pick ur brain on it.
# Posted By Rey Bango | 5/27/08 11:56 PM
@Jim, I actually give up ... tried to install it for 1h, the official site removed the only two help files, which were in Dutch btw... no other support is available... Have you installed it? Could you provide instructions on adding the ISAPI filter? Thanks :)

@Rey, thanks, I'm actually going to start blogging more often, but changing topics and directions a little... you'll see soon :) Feel free to ask any SVN questions, but down that road too many times
# Posted By Rob Gonda | 5/28/08 12:05 AM
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
This blog is running version 5.9.003. Contact Blog Owner