iis监听指定ip配置,iis和nginx共存(win2003和win2008有所不同)

win2003

1,下载httpcfg.exe

2,查看系统监听情况,打开cmd执行

httpcfg query iplisten

输出结果:

HttpQueryServiceConfiguration completed with 1168.

3,这表示没有监听,给iis绑定指定ip

(修改成127.0.0.1这样可以在前端配置个nginx,如果有多个服务器IP的可以和nginx或apache共用80端口了)

httpcfg set iplisten -i 127.0.0.1

执行结果,表示设置正确
HttpQueryServiceConfiguration completed with 0

4,重启服务生效

net stop http /y

iisreset /restart

 

win2008及之后版本设置相对要简单些

 

netsh http show iplist

netsh http add iplisten 127.0.0.1

(修改成127.0.0.1这样可以在前端配置个nginx,如果有多个服务器IP的可以和nginx或apache共用80端口了)

重启服务生效

net stop http /y

iisreset /restart

 

About sun 83 Articles
85后青年,自诩为伪文艺青年

Be the first to comment

Leave a Reply

Your email address will not be published.


*