How to redirect localhost to 127.0.0.1:8080?

天涯浪子 提交于 2019-12-02 22:44:33

问题


When I check using Apache > Service > Test Port 80, then it shows

Your port 80 is actually used by :
Server: Microsoft-HTTPAPI/2.0

How can I disable this. Tried every possible way, even via registry, and stopping World Wide Web Publishing.


回答1:


I don't think that's possible. When you type "localhost" into the browser, it resolves that to "127.0.0.1", and fills in the default port of 80. If nothing is listening there, it won't connect. It can't resolve "localhost" to "127.0.0.1:8080". If you can't use port 80, you have to specify the port you want. Use a bookmark if it makes it easier for you.




回答2:


This is basically redirecting 127.0.0.1:80 to 127.0.0.1:8080

Win7 has no iptables equivalent. Writing a server that does what you want (listens on a port, copies everything to/from another) should be easy enough. You can find one at this URL: http://www.quantumg.net/portforward.php $> netsh $> interface portproxy $> add v4tov4 listenport=xxx connectaddress=127.0.0.1 connectport=yyy protocol=tcp [or]

port forwarding in windows



来源:https://stackoverflow.com/questions/11600408/how-to-redirect-localhost-to-127-0-0-18080

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!