您的位置:首页 > 其它

解决iis默认占用全部ip的80端口问题

2010-05-17 10:45 1111 查看
到2003的CD下的 support/tools/Support.cab.解压出httpcfg.exe文件,COPY到windows/system32/目录下,

命令行

删除默认绑定的全部IP:

httpcfg delete iplisten -i 0.0.0.0
绑定到某IP:

httpcfg set iplisten -i 192.168.1.100
即命令使用IIS的只监听指定的IP及端口
查看绑定:

httpcfg query iplisten
删除绑定:

httpcfg delete iplisten -i 192.168.1.100
起服务

net stop http /y
net start http
iisreset
这时执行netstat -na 应该看到以下内容

TCP 192.168.1.100:80 0.0.0.0:0 LISTENING
如果还是

TCP 0.0.0.0:80 0.0.0.0:0 LISTENING
就是监听的全部IP,没对的.

国外英文帮助:

If you want to set IIS6 only listens on specific IP address, using httpcfg
to do this is the correct way.

Please run the following commands:

1. httpcfg delete iplisten -i 0.0.0.0

This removes IIS from listening on all available IPs 0.0.0.0

2. httpcfg delete iplisten -i <second ip address>

Removes IIS from listening on the second IP

3. 2. httpcfg set iplisten -i <first ip address>

Expliclitly configure IIS to be listening on the first IP

4. httpcfg query iplisten

Check the HTTP.sys IP listening list, you should only see the first IP in
it.

After this above, please run:

net stop http
net start http
iisreset

to restart HTTP service before restarting IIS. Restart IIS services will
not make the changes of HTTP.sys take effect. Or you may reboot the server.

Please check if it works this time. If problem still persists, I will
assist you on the troubleshooting.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: