You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Krist van Besien <kr...@gmail.com> on 2009/03/12 06:23:18 UTC
Re: [users@httpd] cannot access sites through "localhost" on
development computer
On Thu, Mar 12, 2009 at 1:22 AM, Thomas Johansson <tc...@riseup.net> wrote:
> 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.
Krist
--
krist.vanbesien@gmail.com
krist@vanbesien.org
Bremgarten b. Bern, Switzerland
--
A: It reverses the normal flow of conversation.
Q: What's wrong with top-posting?
A: Top-posting.
Q: What's the biggest scourge on plain text email discussions?
---------------------------------------------------------------------
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@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] cannot access sites through "localhost" on
development computer
Posted by Brian Mearns <me...@gmail.com>.
On Fri, Mar 13, 2009 at 5:41 PM, Thomas Johansson <tc...@riseup.net> wrote:
> 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
>
Sorry, no ideas here. This is definitely a DNS and/or Windows issue
though, so you'll probably have better luck on a more relevant mailing
list.
Good luck!
-Brian
--
Feel free to contact me using PGP Encryption:
Key Id: 0x3AA70848
Available from: http://pgp.mit.edu/
---------------------------------------------------------------------
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@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] cannot access sites through "localhost" on development
computer
Posted by André Warnier <aw...@ice-sa.com>.
Thomas Johansson wrote:
> 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...?)
I don't think there is a "right" or "wrong" way to edit a text file.
It's either changed, or not.
>
> 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")?
>
As someone else suggested, this is more of a question for Windows guys
than for Apache guys. Apache itself, to my knowledge, won't even
directly read the hosts file, even less write to it.
It may be that the MS guys have found yet another way to try to be
smarter than the user. Maybe that file is somehow in a list of
"specially protected" files, that Windows restores to some original if
it has been changed ? Maybe (more likely) there is some startup script
or login script that restores the file from a central location whenever
you reboot or logoff/login ? Maybe your machine is part of a network,
where a sysadmin implemented some form of automatic software update or
"restore standard configuration" procedure ?
---------------------------------------------------------------------
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@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] cannot access sites through "localhost" on
development computer
Posted by Thomas Johansson <tc...@riseup.net>.
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" <tc...@riseup.net>:
> Quoting "Brian Mearns" <me...@gmail.com>:
>
>>>>> 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@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
---------------------------------------------------------------------
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@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] cannot access sites through "localhost" on
development computer
Posted by Brian Mearns <me...@gmail.com>.
On Thu, Mar 12, 2009 at 6:25 PM, Thomas Johansson <tc...@riseup.net> wrote:
>
> Thank you, that helped!
Glad to hear it!
-Brian
--
Feel free to contact me using PGP Encryption:
Key Id: 0x3AA70848
Available from: http://pgp.mit.edu/
---------------------------------------------------------------------
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@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] cannot access sites through "localhost" on
development computer
Posted by Thomas Johansson <tc...@riseup.net>.
Quoting "Brian Mearns" <me...@gmail.com>:
>>>> 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@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] cannot access sites through "localhost" on
development computer
Posted by Brian Mearns <me...@gmail.com>.
On Thu, Mar 12, 2009 at 7:31 AM, Eric Covener <co...@gmail.com> wrote:
> On Thu, Mar 12, 2009 at 1:23 AM, Krist van Besien
> <kr...@gmail.com> wrote:
>> On Thu, Mar 12, 2009 at 1:22 AM, Thomas Johansson <tc...@riseup.net> wrote:
>>
>>> 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.
>
> Sometimes Windows will start resolving localhost to an ipv6 address,
> which has bitten me a few times.
>
> --
> Eric Covener
> covener@gmail.com
>
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
--
Feel free to contact me using PGP Encryption:
Key Id: 0x3AA70848
Available from: http://pgp.mit.edu/
---------------------------------------------------------------------
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@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] cannot access sites through "localhost" on
development computer
Posted by Eric Covener <co...@gmail.com>.
On Thu, Mar 12, 2009 at 1:23 AM, Krist van Besien
<kr...@gmail.com> wrote:
> On Thu, Mar 12, 2009 at 1:22 AM, Thomas Johansson <tc...@riseup.net> wrote:
>
>> 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.
Sometimes Windows will start resolving localhost to an ipv6 address,
which has bitten me a few times.
--
Eric Covener
covener@gmail.com
---------------------------------------------------------------------
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@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org