-3

Due to unidentified problem, any service pid4 is using port 80 of my Windows 7-64 bit PC's. I ultimately decided to change my default port to 8080. But how can I change the way that when I enter localhost in URL, then automatically the data from 127.0.0.1:8080 comes.

I also edited the hosts file as

127.0.0.1:8080 localhost

but it didn't work. Please help me someone.

Thompson
  • 125
  • 5
  • 1
    On what OS? If it's linux use iptables. But I would tend to identify the uniedentified problem, though. – Michuelnik Jul 22 '12 at 12:54
  • 1
    It helps if you explain what the problem is rather than starting with a suggested solution. Why do you need to do this? What issue do you expect this to solve? – David Schwartz Jul 22 '12 at 15:26
  • The 'unidentified problem' could be Skype. It uses port 80 unless you tell it not to. Whatever it is, find it and fix it. At the moment you're only generating more problems. – user207421 Jul 23 '12 at 05:22

1 Answers1

4

You can't specify a port in a hosts file or DNS A record. You need to do one of two things:

  1. Type :8080 into the browser at the end of your URL.

  2. Redirect traffic on port 80 to 8080 using a reverse proxy, rewrite rule, or firewall rule.

MDMarra
  • 100,183
  • 32
  • 195
  • 326