Apache only works with localhost

Apache only works with localhost

Post by jeff » Tue, 02 Dec 2003 01:19:25

I am using a Windows XP machine with Apache 1.3.28 working somewhat. I
can go to localhost:8080 (I use Port 8080 because that is the only way
I could get it setup) and I see my page. However, when I go to my
private ip address ( and or my private IP with :8080 on
the end, nothing happens. I also tried going to my network IP
( and with an :8080 on the end. Once again neither
worked. I also tried messing with my router it is one of those new
linksys routers 2.4 ghz's. I set it up so that both port 80 and 8080
from outside should go to my computer, but I may have set it up wrong.

Pretty much I don't know what to mess with, Apache or my router. Any
help is useful! Thanks.

Please Please Please help, I posted this a few days ago twice on
accident in the same thread and nobody responded for a few days so I
thought it might be that they thought a person had already answered.

Apache only works with localhost

Post by Avenge » Wed, 07 Jan 2004 21:53:38


I think I had the same problem ages ago and I solved it by putting
http://www.yqcomputer.com/ :8080/

The xxx.xxx.xxx.xxx:8080/ did not seem to work in the browser by itself.
While local host did...



Apache only works with localhost

Post by charlieull » Sun, 11 Jan 2004 08:55:46

Erm, I'm not really an expert, but I've had a similar problem.

Are you trying to run your server as an external website, or are you
happy with it as localhost for the moment? I presume you want an
external website, hence the wanting to bind to the IP address, and not

So...don't bite my head off, I don't want to sound patronising, but
how is your Apache configured? Basically the two commands you want (I
think, I'm not sure how it's changed as I've got Apache 2.0.43) are in
the httpd.conf file, one probably says "Listen 8080", and the other
would say ServerName localhost, or maybe ServerName

The Listen command tells Apache to bind to port 8080 and check for any
requests on that port, you don't necessarily have to specify an IP
address in the command, so it's probably easiest just to leave it at
Listen 8080. Whatever's in the ServerName is important, and I can't
quite work out from your post what you've got it set to. Either way,
if you want it to be externally available, you need to set it to the
public IP address which won't be the same as your private (i.e.
internal) IP address. If you can't bind to the external address I
think you have either of two problems: it's either the firewall
settings (either the hardware firewall, or the Windows XP firewall) or
else it's something weird with your provider. First you need to check
that you have an IP address which is basically the address for your
machine, and not for the whole home network. On mine, I can configure
the hardware (i.e. router) firewall so that there is one "allowed
application" on my machine that accepts requests from the outside
internet, I select the application type and check web_server. Next you
need to do exactly the same thing to the Windows XP firewall. The
thing is, when you select "allowed applications" on the Hardware
Firewall, the firewall issues my machine with a specific "public" IP
address which isn't the same as the IP address for the network. Then I
set my Apache to Listen 80, and ServerName as 12.34.567.89:80 (you'd
be using 8080 instead of 80 there).

Let me know if this gets you any closer to your object.