PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > comp.info.servers.win > Apache on XP; Can't connect to localhost at all
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.info.servers.win Web servers for MS Windows and NT.

Apache on XP; Can't connect to localhost at all

Réponse
 
LinkBack Outils de la discussion
Vieux 30/10/2005, 04h32   #1
Marty
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Apache on XP; Can't connect to localhost at all

I want to learn php/mySQL for simple websites, so I'm trying to
install a local Apache server on my system (XP, sp2 with all latest
updates); I've tried XAMPP several times (both manually and
installer), and then Apache by itself, always with the same problem:
the server runs OK, but when I try to connect to either localhost or
127.0.0.1, it just sits there doing nothing (no error, no timeout...).

I can see that the server is running OK, there's nothing unusual in
the logs. I've tried disabling XP's firewall completely. I don't
have IIS, or any other conflicting servers of any sort. I'm running
as administrator.

I'm assuming since this is on my computer that my router has no effect
- is this a safe assumption? The only other possibility is that I
have Cisco VPN software, but it's not running at all.

Any suggestions?
--
Marty public.forums at gmail.com
Sorry, I don't believe in taglines today
  Réponse avec citation
Vieux 30/10/2005, 06h07   #2
Stephan Navert
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Apache on XP; Can't connect to localhost at all

Marty schrieb:
> I want to learn php/mySQL for simple websites, so I'm trying to
> install a local Apache server on my system (XP, sp2 with all latest
> updates); I've tried XAMPP several times (both manually and
> installer), and then Apache by itself, always with the same problem:
> the server runs OK, but when I try to connect to either localhost or
> 127.0.0.1, it just sits there doing nothing (no error, no timeout...).
>
> I can see that the server is running OK, there's nothing unusual in
> the logs. I've tried disabling XP's firewall completely. I don't
> have IIS, or any other conflicting servers of any sort. I'm running
> as administrator.
>
> I'm assuming since this is on my computer that my router has no effect
> - is this a safe assumption? The only other possibility is that I
> have Cisco VPN software, but it's not running at all.
>
> Any suggestions?


I had the similar problem:
the adress "localhost" is not known to your network. There are now two
workaround:
- set up a DNS - server on your computer
- modify the host - file (simple and it works fine for me):
Go to C:/WINDOWS/system32/etc/
With your favorite editor, open the file 'hosts' and add the following line
127.0.0.1 localhost
reboot - and you will be fine. If you set up several virtual hosts, do
not forget to add their names to your hosts-file in the same way.

good luck

Stephan
  Réponse avec citation
Vieux 30/10/2005, 06h07   #3
Stephan Navert
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Apache on XP; Can't connect to localhost at all


  Réponse avec citation
Vieux 30/10/2005, 13h32   #4
Nil
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Apache on XP; Can't connect to localhost at all

On 30 Oct 2005, Stephan Navert <snavert@hispeed.ch> wrote in
news:dk1nvh$nk0$1@news.hispeed.ch:

> I had the similar problem:
> the adress "localhost" is not known to your network. There are now
> two workaround:
> - set up a DNS - server on your computer
> - modify the host - file (simple and it works fine for me):
> Go to C:/WINDOWS/system32/etc/
> With your favorite editor, open the file 'hosts' and add the
> following line
> 127.0.0.1 localhost
> reboot - and you will be fine.


That's very strange. Every system I've ever looked at the hosts file of
had localhost defined by default. I just looked at my Win 2K system
here at home, and it has only one entry - "127.0.0.1 localhost". I'm
certain that this is the default hosts file provided by Microsoft
during installation and that I've never modified it.

I wonder why yours didn't have the localhost definition? And if/why the
original poster doesn't have it either.
  Réponse avec citation
Vieux 30/10/2005, 13h32   #5
Nil
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Apache on XP; Can't connect to localhost at all

On 30 Oct 2005, Stephan Navert <snavert@hispeed.ch> wrote in
news:dk1nvh$nk0$1@news.hispeed.ch:

> I had the similar problem:
> the adress "localhost" is not known to your network. There are now
> two workaround:
> - set up a DNS - server on your computer
> - modify the host - file (simple and it works fine for me):
> Go to C:/WINDOWS/system32/etc/
> With your favorite editor, open the file 'hosts' and add the
> following line
> 127.0.0.1 localhost
> reboot - and you will be fine.


That's very strange. Every system I've ever looked at the hosts file of
had localhost defined by default. I just looked at my Win 2K system
here at home, and it has only one entry - "127.0.0.1 localhost". I'm
certain that this is the default hosts file provided by Microsoft
during installation and that I've never modified it.

I wonder why yours didn't have the localhost definition? And if/why the
original poster doesn't have it either.
  Réponse avec citation
Vieux 30/10/2005, 17h40   #6
Marty
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Apache on XP; Can't connect to localhost at all


  Réponse avec citation
Vieux 30/10/2005, 17h40   #7
Marty
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Apache on XP; Can't connect to localhost at all

Back on Sun, 30 Oct 2005 07:07:46 +0100, while hiding out in
comp.infosystems.www.servers.ms-windows,Stephan Navert
<snavert@hispeed.ch> surprised everyone by saying:

>Marty schrieb:
>> I want to learn php/mySQL for simple websites, so I'm trying to
>> install a local Apache server on my system (XP, sp2 with all latest
>> updates); I've tried XAMPP several times (both manually and
>> installer), and then Apache by itself, always with the same problem:
>> the server runs OK, but when I try to connect to either localhost or
>> 127.0.0.1, it just sits there doing nothing (no error, no timeout...).
>>
>> I can see that the server is running OK, there's nothing unusual in
>> the logs. I've tried disabling XP's firewall completely. I don't
>> have IIS, or any other conflicting servers of any sort. I'm running
>> as administrator.
>>
>> I'm assuming since this is on my computer that my router has no effect
>> - is this a safe assumption? The only other possibility is that I
>> have Cisco VPN software, but it's not running at all.
>>
>> Any suggestions?

>
>I had the similar problem:
>the adress "localhost" is not known to your network. There are now two
>workaround:
>- set up a DNS - server on your computer
>- modify the host - file (simple and it works fine for me):
>Go to C:/WINDOWS/system32/etc/
>With your favorite editor, open the file 'hosts' and add the following line
>127.0.0.1 localhost
>reboot - and you will be fine. If you set up several virtual hosts, do
>not forget to add their names to your hosts-file in the same way.
>

Thanks, Stephan - unfortunately, this isn't the problem - it was
defined, but I usually also try 127.0.0.1 explicitly just to make
sure. Both give the same results.

Note that I get no error at all. If I stop Apache, I will get an
error that the connection was refused.

I've checked using the utility that came with XAMPP, and it shows
Apache handling port 80, and the Apache Monitor in the tray shows it's
running all services.

I checked running services using the XP tool, and Apache is running,
but nothing else that should interfere, I don't think.

Are my assumptions correct that I can run both the server and the
client on the same machine? And that the router won't have any
effect? This is the only thing I'm not sure about.
--
Marty public.forums at gmail.com
Press Enter to Exit


  Réponse avec citation
Vieux 30/10/2005, 17h45   #8
Marty
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Apache on XP; Can't connect to localhost at all

Back on Sun, 30 Oct 2005 07:32:32 -0600, while hiding out in
comp.infosystems.www.servers.ms-windows,Nil
<rednoise@REMOVETHIScomcast.net> surprised everyone by saying:

>On 30 Oct 2005, Stephan Navert <snavert@hispeed.ch> wrote in
>news:dk1nvh$nk0$1@news.hispeed.ch:
>
>> I had the similar problem:
>> the adress "localhost" is not known to your network. There are now
>> two workaround:
>> - set up a DNS - server on your computer
>> - modify the host - file (simple and it works fine for me):
>> Go to C:/WINDOWS/system32/etc/
>> With your favorite editor, open the file 'hosts' and add the
>> following line
>> 127.0.0.1 localhost
>> reboot - and you will be fine.

>
>That's very strange. Every system I've ever looked at the hosts file of
>had localhost defined by default. I just looked at my Win 2K system
>here at home, and it has only one entry - "127.0.0.1 localhost". I'm
>certain that this is the default hosts file provided by Microsoft
>during installation and that I've never modified it.
>
>I wonder why yours didn't have the localhost definition? And if/why the
>original poster doesn't have it either.


I had it, although I don't remember if it came that way; I know the
older windows had no hosts file, but only hosts.sam and lmhosts.sam,
as samples. The sample hosts file had the entry for localhost, but it
would only work if you copied/renamed to remove the .sam.

But, as I said in the original post, I also tried http://127.0.0.1/
explicitly. Maybe I should try it on another system on my little lan.
--
Marty public.forums at gmail.com
No matter how many times you throw a dead fish in the water,
it still won't swim.
  Réponse avec citation
Vieux 30/10/2005, 17h45   #9
Marty
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Apache on XP; Can't connect to localhost at all

Back on Sun, 30 Oct 2005 07:32:32 -0600, while hiding out in
comp.infosystems.www.servers.ms-windows,Nil
<rednoise@REMOVETHIScomcast.net> surprised everyone by saying:

>On 30 Oct 2005, Stephan Navert <snavert@hispeed.ch> wrote in
>news:dk1nvh$nk0$1@news.hispeed.ch:
>
>> I had the similar problem:
>> the adress "localhost" is not known to your network. There are now
>> two workaround:
>> - set up a DNS - server on your computer
>> - modify the host - file (simple and it works fine for me):
>> Go to C:/WINDOWS/system32/etc/
>> With your favorite editor, open the file 'hosts' and add the
>> following line
>> 127.0.0.1 localhost
>> reboot - and you will be fine.

>
>That's very strange. Every system I've ever looked at the hosts file of
>had localhost defined by default. I just looked at my Win 2K system
>here at home, and it has only one entry - "127.0.0.1 localhost". I'm
>certain that this is the default hosts file provided by Microsoft
>during installation and that I've never modified it.
>
>I wonder why yours didn't have the localhost definition? And if/why the
>original poster doesn't have it either.


I had it, although I don't remember if it came that way; I know the
older windows had no hosts file, but only hosts.sam and lmhosts.sam,
as samples. The sample hosts file had the entry for localhost, but it
would only work if you copied/renamed to remove the .sam.

But, as I said in the original post, I also tried http://127.0.0.1/
explicitly. Maybe I should try it on another system on my little lan.
--
Marty public.forums at gmail.com
No matter how many times you throw a dead fish in the water,
it still won't swim.
  Réponse avec citation
Vieux 30/10/2005, 18h11   #10
Purl Gurl
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Apache on XP; Can't connect to localhost at all

Marty
> rednoise wrote:
>> Stephan Navert wrote:


(snipped)

>>That's very strange. Every system I've ever looked at the hosts file of
>>had localhost defined by default. I just looked at my Win 2K system
>>here at home, and it has only one entry - "127.0.0.1 localhost". I'm
>>certain that this is the default hosts file provided by Microsoft
>>during installation and that I've never modified it.


> I had it, although I don't remember if it came that way; I know the
> older windows had no hosts file, but only hosts.sam and lmhosts.sam,
> as samples. The sample hosts file had the entry for localhost, but it
> would only work if you copied/renamed to remove the .sam.


Windows, since 3.x versions, default installs "host" in c:\windows directory.

Your hosts.sam and lmhosts.sam are created by third party software.

http://www.apachefriends.org/en/faq-xampp-windows.html

BEGIN QUOTE

* XAMPP does not work under Windows XP SP2!

Sure! But here, Microsoft delivered a new firewall. This firewall blocks the important
ports 80 (http) and 443 (https) and the server does not want to start (anymore).
The fast solution: Deactivate the Microsoft firewall with the toolbar and try to start
XAMPP once more. Of course everybody also can define the own firwall exceptions in the
security center. The following ports are needed for a basic functionality:

http 80 (HTTP)
https 443 (SSL)
mysql 3306
And for all other servers in XAMPP:
ftp 21
smtp 25
pop3 110
imap 143
AJP/1.3 8009
http-alt 8080 (Tomcat Default Port)

END QUOTE

If you are running a virus scanner, personal firewall or a program which
binds port 80, turn them off for testing.

You cannot request "localhost" through a router. You must make your browser
request to localhost on the same machine upon which Apache is mounted; your
browser and Apache must be on the same machine. You must have a file "hosts"
in the correct default Windows directory which resolves localhost to 127.0.0.1
for localhost requests to work.


Purl Gurl

  Réponse avec citation
Vieux 30/10/2005, 18h11   #11
Purl Gurl
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Apache on XP; Can't connect to localhost at all

Marty
> rednoise wrote:
>> Stephan Navert wrote:


(snipped)

>>That's very strange. Every system I've ever looked at the hosts file of
>>had localhost defined by default. I just looked at my Win 2K system
>>here at home, and it has only one entry - "127.0.0.1 localhost". I'm
>>certain that this is the default hosts file provided by Microsoft
>>during installation and that I've never modified it.


> I had it, although I don't remember if it came that way; I know the
> older windows had no hosts file, but only hosts.sam and lmhosts.sam,
> as samples. The sample hosts file had the entry for localhost, but it
> would only work if you copied/renamed to remove the .sam.


Windows, since 3.x versions, default installs "host" in c:\windows directory.

Your hosts.sam and lmhosts.sam are created by third party software.

http://www.apachefriends.org/en/faq-xampp-windows.html

BEGIN QUOTE

* XAMPP does not work under Windows XP SP2!

Sure! But here, Microsoft delivered a new firewall. This firewall blocks the important
ports 80 (http) and 443 (https) and the server does not want to start (anymore).
The fast solution: Deactivate the Microsoft firewall with the toolbar and try to start
XAMPP once more. Of course everybody also can define the own firwall exceptions in the
security center. The following ports are needed for a basic functionality:

http 80 (HTTP)
https 443 (SSL)
mysql 3306
And for all other servers in XAMPP:
ftp 21
smtp 25
pop3 110
imap 143
AJP/1.3 8009
http-alt 8080 (Tomcat Default Port)

END QUOTE

If you are running a virus scanner, personal firewall or a program which
binds port 80, turn them off for testing.

You cannot request "localhost" through a router. You must make your browser
request to localhost on the same machine upon which Apache is mounted; your
browser and Apache must be on the same machine. You must have a file "hosts"
in the correct default Windows directory which resolves localhost to 127.0.0.1
for localhost requests to work.


Purl Gurl

  Réponse avec citation
Vieux 30/10/2005, 19h50   #12
Nil
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Apache on XP; Can't connect to localhost at all

On 30 Oct 2005, Purl Gurl <purlgurl@purlgurl.net> wrote in
news:43650CD3.7080104@purlgurl.net:

> Windows, since 3.x versions, default installs "host" in
> c:\windows directory.


But Windows NT, 2000, and XP put it in \windows\system32\drivers\etc

> Your hosts.sam and lmhosts.sam are created by third party
> software.


No, those sample files were always installed by Windows.

> http://www.apachefriends.org/en/faq-xampp-windows.html


The rest of this looks like the real answer. This same question gets
asked here about every day. I'll have to make a note of this, even
though it doesn't apply to me.

> BEGIN QUOTE
>
> * XAMPP does not work under Windows XP SP2!
>
> Sure! But here, Microsoft delivered a new firewall. This firewall
> blocks the important ports 80 (http) and 443 (https) and the
> server does not want to start (anymore). The fast solution:
> Deactivate the Microsoft firewall with the toolbar and try to
> start XAMPP once more. Of course everybody also can define the own
> firwall exceptions in the security center. The following ports are
> needed for a basic functionality:
>
> http 80 (HTTP)
> https 443 (SSL)
> mysql 3306
> And for all other servers in XAMPP:
> ftp 21
> smtp 25
> pop3 110
> imap 143
> AJP/1.3 8009
> http-alt 8080 (Tomcat Default Port)
>
> END QUOTE
>
> If you are running a virus scanner, personal firewall or a program
> which binds port 80, turn them off for testing.
>
> You cannot request "localhost" through a router. You must make
> your browser request to localhost on the same machine upon which
> Apache is mounted; your browser and Apache must be on the same
> machine. You must have a file "hosts" in the correct default
> Windows directory which resolves localhost to 127.0.0.1 for
> localhost requests to work.

  Réponse avec citation
Vieux 30/10/2005, 20h16   #13
Purl Gurl
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Apache on XP; Can't connect to localhost at all

Nil wrote:
> Purl Gurl wrote:


(snipped)

>>Windows, since 3.x versions, default installs "host" in
>>c:\windows directory.


> But Windows NT, 2000, and XP put it in \windows\system32\drivers\etc


Previously written by Purl Gurl:

"You must have a file "hosts" in the correct default Windows directory"

Poor wording early on in my article. c:\windows\ ... default location.
I should have noted "default location" early on.

>>Your hosts.sam and lmhosts.sam are created by third party
>>software.


> No, those sample files were always installed by Windows.


Yes, I cited the filenames assbackwards,

A file "hosts.sam" is created by Windows 9x versions.

A file "hosts" is created by third party software for Windows 9x versions.

Windows XP creates both "hosts" and "imhost.sam" unlike 9x versions.

There is an executable in WinXP (NT5) machines, "hostname.exe" located
in c:\windows directory. Not sure what purpose it serves. It appears
to be a legacy MSDOS executable, although not included in DOS 6.x and
DOS 7.x installs. That file might be related to Windows personal webserver
and is not a legacy leftover.


> The rest of this looks like the real answer. This same question gets
> asked here about every day. I'll have to make a note of this, even
> though it doesn't apply to me.


Most often an inability to connect to localhost is related to
a firewall configuration; requests to port 80 are being blocked.

Next most often is running two programs both wanting to bind
port 80, such as running both IIS and Apache.


Purl Gurl

  Réponse avec citation
Vieux 30/10/2005, 20h16   #14
Purl Gurl
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Apache on XP; Can't connect to localhost at all

Nil wrote:
> Purl Gurl wrote:


(snipped)

>>Windows, since 3.x versions, default installs "host" in
>>c:\windows directory.


> But Windows NT, 2000, and XP put it in \windows\system32\drivers\etc


Previously written by Purl Gurl:

"You must have a file "hosts" in the correct default Windows directory"

Poor wording early on in my article. c:\windows\ ... default location.
I should have noted "default location" early on.

>>Your hosts.sam and lmhosts.sam are created by third party
>>software.


> No, those sample files were always installed by Windows.


Yes, I cited the filenames assbackwards,

A file "hosts.sam" is created by Windows 9x versions.

A file "hosts" is created by third party software for Windows 9x versions.

Windows XP creates both "hosts" and "imhost.sam" unlike 9x versions.

There is an executable in WinXP (NT5) machines, "hostname.exe" located
in c:\windows directory. Not sure what purpose it serves. It appears
to be a legacy MSDOS executable, although not included in DOS 6.x and
DOS 7.x installs. That file might be related to Windows personal webserver
and is not a legacy leftover.


> The rest of this looks like the real answer. This same question gets
> asked here about every day. I'll have to make a note of this, even
> though it doesn't apply to me.


Most often an inability to connect to localhost is related to
a firewall configuration; requests to port 80 are being blocked.

Next most often is running two programs both wanting to bind
port 80, such as running both IIS and Apache.


Purl Gurl

  Réponse avec citation
Vieux 02/11/2005, 19h24   #15
Marty
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Apache on XP; Can't connect to localhost at all

Somewhere around Sun, 30 Oct 2005 12:16:30 -0800, while reading
comp.infosystems.www.servers.ms-windows, I think I thought I saw this post
from Purl Gurl <purlgurl@purlgurl.net>:
.. . .
>
>Most often an inability to connect to localhost is related to
>a firewall configuration; requests to port 80 are being blocked.
>
>Next most often is running two programs both wanting to bind
>port 80, such as running both IIS and Apache.
>

I didn't exactly find out why I had the problem, but unfortunately, I may
never find out.

I installed the same thing on another XP SP2 machine, without a lot of extra
stuff installed, standard firewall settings, and it worked right off, so I
know I was doing it correctly.

So, I started uninstalling things on my other system that I didn't need
right away, like Google desktop, internet download manager, ...

I rebooted and my networking was completely gone. Then, a windows popped up
from security saying my system was shutting down in 1 minute, very similar
to some virus/worms that were going around a while back (sasser, etc). But,
I do auto updates, have NAV running all the time, and generally keep an eye
out for unusual activity, so I don't think it was a virus, and it wasn't
exactly the same as anything I could find. Even in safe mode it did this,
and even after a repair/upgrade of XP, so I had to reinstall XP, and now it
works as it should. So, I'll never know what it was, I guess (I hope).

Thanks to all who tried to , though.

--
Marty - public.forums (at) gmail (dot) com
"Those are my principles, and if you don't like them...
well, I have others." - Groucho Marx
  Réponse avec citation
Vieux 02/11/2005, 19h24   #16
Marty
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Apache on XP; Can't connect to localhost at all

Somewhere around Sun, 30 Oct 2005 12:16:30 -0800, while reading
comp.infosystems.www.servers.ms-windows, I think I thought I saw this post
from Purl Gurl <purlgurl@purlgurl.net>:
.. . .
>
>Most often an inability to connect to localhost is related to
>a firewall configuration; requests to port 80 are being blocked.
>
>Next most often is running two programs both wanting to bind
>port 80, such as running both IIS and Apache.
>

I didn't exactly find out why I had the problem, but unfortunately, I may
never find out.

I installed the same thing on another XP SP2 machine, without a lot of extra
stuff installed, standard firewall settings, and it worked right off, so I
know I was doing it correctly.

So, I started uninstalling things on my other system that I didn't need
right away, like Google desktop, internet download manager, ...

I rebooted and my networking was completely gone. Then, a windows popped up
from security saying my system was shutting down in 1 minute, very similar
to some virus/worms that were going around a while back (sasser, etc). But,
I do auto updates, have NAV running all the time, and generally keep an eye
out for unusual activity, so I don't think it was a virus, and it wasn't
exactly the same as anything I could find. Even in safe mode it did this,
and even after a repair/upgrade of XP, so I had to reinstall XP, and now it
works as it should. So, I'll never know what it was, I guess (I hope).

Thanks to all who tried to , though.

--
Marty - public.forums (at) gmail (dot) com
"Those are my principles, and if you don't like them...
well, I have others." - Groucho Marx
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 12h18.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,31784 seconds with 24 queries