How can I control which IP address IIS7 uses?
In Win2k3, I used httpcfg
to tell IIS to listen to specific IP addresses on the server. I want to run Apache with VisualSVN Server on port 80 on another IP address but IIS7 binds to all IP addresses by default.
What utility for IIS7 controls the IIS7 bindings?
I found the answer. There is a utility called netsh
.
netsh http add iplisten ipaddress=xxx.xxx.xxx.xxx
By default there are no IP addresses on the list, so IIS7 will bind to all IP addresses. If you add one IP to the list, it will listen to just that IP or any IP added to the list. It is necessary to restart IIS7 for the change to take effect.
Edit:
To list the IP addresses, type the following command after the IP address is added:
netsh http show iplisten
The netsh
utility returns the following information:
IP addresses present in the IP listen list: xxx.xxx.x.x