Page 1 of 1

Why localhost does not work on windows

PostPosted: Mon Dec 10, 2012 01:13
by jordan4ibanez
In case you are wondering why doing localhost does not work on windows, it's because by default 127.0.0.1 is not directed to localhost, to fix this, run notepad as admin, then open:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
WINDOWSDRIVE\Windows\system32\drivers\etc\hosts


And add:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
127.0.0.1 localhost


To the bottom of it.

PostPosted: Mon Dec 10, 2012 06:58
by OmniStudent
Weird that something this basic is left out in Windows. Did they forget, or was there a reason behind it?

PostPosted: Mon Dec 10, 2012 08:20
by Calinou
There is a pull request to fix it on Github (it makes "localhost" always connect to 127.0.0.1).
https://github.com/celeron55/minetest/pull/216

PostPosted: Mon Dec 10, 2012 13:59
by dannydark
OmniStudent wrote:Weird that something this basic is left out in Windows. Did they forget, or was there a reason behind it?


Its because by default localhost is reserved for windows server in some installs, although I have to say I have never had a problem accessing 127.0.0.1 via localhost on windows :S well other than in older versions of windows like xp, vista etc Windows 7/8 seem to work fine when connecting to localhost.