Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 comes.

I also edited the hosts file as localhost

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

share|improve this question
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
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. – EJP Jul 23 '12 at 5:22
up vote 4 down vote accepted

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.