1、访问MQ地址

2、一会要实现通过访问http://127.0.0.1也能直接访问该地址。现在访问127.0.0.1是不通的。

3、使用管理员打开cmd命令提示符。

4、执行命令:netsh interface portproxy add v4tov4 listenaddress=127.0.0.1 listenport=80 connectaddress=10.0.40.100 connectport=80#listenaddress 要监听的ip地址,也就是最终要访问的ip地址。#connectadress 要链接的服务器地址,也就是RealServer#port就不用解释了,就是端口。

5、然后现在访问127.0.0.1看看效果。

6、是不是很方便了。要查看所有的侦听端口#netsh interface portproxy show all

7、要删除某条规则,执行命令:#netsh interface portproxy delete v4tov4 listenaddress=127.0.0.1 listenport=80

8、再次查看规则列表#netsh interface portproxy show all已经删除了。
