简体   繁体   中英

How to redirect localhost to 127.0.0.1:8080?

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.

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.

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

Suggestion: If your Apache is under your WIn10 Under Win Settings: - Proxy - Manual proxy setup - Use a proxy server - Turn On - Type under Manual proxy server http=127.0.0.1:8080;https=127.0.0.1:8080 - Press the Save button and tell me if it is working.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM