Sign in with
Sign up | Sign in
Your question
Solved

How to change 127 0 0 1 to read localhost

Last response: in Windows 7
Share
January 8, 2013 2:20:27 AM

I somehow changed localhost in attempting to open it in a different port. Stupid. But, can't remember what I changed it to and now can't locate localhost. Please help.

More about : change 127 read localhost

a b $ Windows 7
January 8, 2013 2:57:38 AM

Go to C:\Windows\System32\Drivers\etc and you should see two files, one called hosts and localhosts or lmhosts, make a copy of these and drag them somewhere safe (just in case). Once you have them backed up somewhere else, not in the same folder preferrably, delete them, and then reboot your computer. Windows will rebuild them upon reboot.

127.0.0.1 is a loopback on your network adapter and nothing more.

If you're not comfortable doing all that, go HERE and follow the directions.
m
0
l
January 8, 2013 2:18:09 PM

the 2 deleted files, hosts and lmhosts, were not rebuilt after reboot. I did not have a file named localhost in that directory. I am on a windows 7 OS. What do you think? And by the way, thanks for the help. I should say that there is another file in the etc folder called hosts.old which I didn't touch.
m
0
l
Related resources
January 8, 2013 2:35:08 PM

If you are trying to connect to a different port, why are you changing your hosts/lmhost files? You should not be doing this.

Just connect to the different port by using

\\127.0.0.1:1025

or some other port number after the colon. Also you may not need the \\ as this is typically used in your browser or from explorer for connections


From command line it would be
example:
telnet 127.0.0.1 25

-notice the space between IP and port 25 (you can call out any port so long as it exists as an open port on the PC you are connecting to.
m
0
l
January 8, 2013 3:00:08 PM

I am a wesite designer, and at some point about a year ago, I decided to check out MS Matrix. As I recall it uses IIS and it needed the port that I had WAMP on. So I tried re-assigning it. My memory is vague, but I think that I changed it to something like localhost8080 or something similar, but now can't connect with anything. I recently began considering using a cms again like wordpress and can't connect with wamp or IIS so I was going to start over. I have always built websites completely from scratch, without a content management system. So I wanted to reset it and start from scratch using a CMS.
m
0
l
January 9, 2013 6:26:01 PM

Ok, now your motives become clear. Unfortuneately you are getting outside my area of expertise. I though you were having a network problem. The issue is you want your server/PC to respond to http requests on this port correct?..., and it is not?

You need to setup the network first, see my previous responses; then when it is working ensure your firewall does not block that port (completely separate issue), then setup IIS or some other server side component to respond to http requests, making any adjustments to the port they will respond on accordingly.

Reference this: http://www.speedguide.net/port.php?port=8080

Finally implement and test the website from a network other than your local area network.

m
0
l

Best solution

January 9, 2013 6:33:30 PM

Oh, geeze, I didn't answer your question in the first place! Port 80 is the default port for HTTP, you should setup your http server on it if others outside your network will use it.

Port 8080 is a port that is frequently used for proxy servers, a "debug" or "admin" server.
Share
January 20, 2013 4:17:55 AM

Best answer selected by dongallucci1.
m
0
l
January 20, 2013 4:22:33 AM

tigerwild said:
Oh, geeze, I didn't answer your question in the first place! Port 80 is the default port for HTTP, you should setup your http server on it if others outside your network will use it.

Port 8080 is a port that is frequently used for proxy servers, a "debug" or "admin" server.




thanks, I used 8080 instead. Apparently that was what I had been using before from looking at some old files. I hadn't used localhost in so long that I forgot. Tanks again.
m
0
l
!