Re: cannot access sites through "localhost" on development computer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sorry to get back on this issue. The solution only helped temporarily (for 2 days). Now it appears Windows has changed the host file and deleted the line I added to it. (Perhaps something having to do with permissions, that I didn't change it the right way...?)

Which sort of suggests that the real problem perhaps is more fundamental. After all, my setup used to work fine (for almost a year); it was just a few days ago that "localhost" stopped working. Maybe the problem is in Windows Vista, which perhaps has started resetting the host file periodically (including the original DNS reference to "localhost")?

Any ideas someone??

Thomas


Quoting "Thomas Johansson" <tcjohans@xxxxxxxxxx>:

Quoting "Brian Mearns" <mearns.b@xxxxxxxxx>:

In my Apache documentation, I read somewhere that I could instead try
http://127.0.0.1. And when I do so, it works fine (i.e. I get to my Inetpub
folder and can see my web sites and their pages and work as normal).
According to the same documentation, this would suggest that I "have serious DNS problems", but it does not say what I need to do to fix it. And I cannot
find the answer anywhere on the Apache site either.

You do indeed have DNS problems. Your computer does not now how to
resolve "localhost" anymore. This is not a problem of apache, and will
not be solved by reinstalling it. You problem is clearly with Vista,
which is why you won't find the answer on the Apache site.


There should be a hosts file somwhere buried under your windows
directory...you could try adding an entry to explicitely map localhost
to 127.0.01. I think the file is at
C:\Windows\system32\drivers\etc\hosts, but can't verify on Vista.
Anyway, if you find it, you can add a line like:
127.0.0.1 localhost
and save it (you'll need admin rights, I think).

Hope that helps,
-Brian

Thank you, that helped! There is indeed a file at C:\Windows\system32\drivers\etc\hosts and I added "127.0.0.1 localhost" as a new line at the bottom of that file (separating 127.0.0.1 and localhost with several spaces), and now it works just fine, the way it used to.

At first I tried to edit the host file directly with Notepad, but Windows wouldn't allow that, and I didn't manage to set the permissions I needed. So instead I copied the original host file into a regular folder of my own, edited it with Notepad (being careful to not change the file extension), and then copied the new version back to the original location, thus replacing the original host file.

Again, thanks a lot for your help!

Thomas

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux