Sign in with
Sign up | Sign in
Your question

HTTP server doesn't work.

Last response: in Networking
Share
April 3, 2003 10:16:55 AM

Hej igen,

My lan is working now, but I now have a new problem. I want to host our 2 websites at home.

I have setup Apache and it is running, if I call up 127.0.0.1 - I can see a page. From another machine on the lan side of the router, if I call up the IP of the machine running Apache, the page appears.

At my domain registry, I have changed the domain target to my fixed IP address, (which I have checked from two different sources), this has filtered through to the DNS server because if I type my url into a machine it retrieves and attempts to connect to the right IP.

I have opened port 80, (and just port 80), on the internal IP for the Apache host machine, (and just that one), on the D-Link to allow the GET through, so I figured it should work, however, when I type the url, it 404's me.

Conceptually, is what I have done right/all I need to do or am I missing something?

Med venlig hilsen,
adrianxw

More about : http server work

April 3, 2003 11:01:02 AM

It sound like you did everything right. Can you get to it using IP address rather than name?

<i>It's always the one thing you never suspected.</i>
April 3, 2003 2:52:25 PM

>>> Can you get to it using IP address rather than name?

Just tried, still 404.

>>> It sound like you did everything right.

Yes, I couldn't see what else should be necessary. Is it possible the router "say" it has opened the port but in reality has not, i.e. is there a way I can force a message through so that I see it in some log, even an error log?



Med venlig hilsen,
adrianxw
Related resources
April 3, 2003 2:53:52 PM

try telnetting to port 80

i.e.

telnet 192.168.0.1 80

using whatever the correct IP address is...

<i>It's always the one thing you never suspected.</i>
April 3, 2003 3:00:43 PM

I opened the command line prompt and typed just as you said, (guess that is right). I got a white backgrounded window, and an hour glass, after short time I have messagebox "Connect Failed!", in box it says Host Name:nn.nn.nn.nn where the IP looks right.

Is the telnet expecting a certain reply from Apache, (which is the only thing listening to port 80, (I hope!). Can I simulate this somehow to see if the telnet is getting through the router/firewall? Telnet is a logon yes?

Med venlig hilsen,
adrianxw<P ID="edit"><FONT SIZE=-1><EM>Edited by adrianxw on 04/03/03 05:01 PM.</EM></FONT></P>
April 3, 2003 5:15:55 PM

when you get the white box try typing something like HELLO and see if you get a response

<i>It's always the one thing you never suspected.</i>
April 3, 2003 5:38:20 PM

Won't let me type, just clicks from the system speaker.

I have tried cycling the power on the DSL modem, had no effect. (I know you didn't say that, but it helped last time!).

Med venlig hilsen,
adrianxw
April 3, 2003 8:41:29 PM

it's definitely not getting through. You sure you have the IP address forwarded right, and it hasn't accidentally changed due to a different DHCP lease in effect?

<i>It's always the one thing you never suspected.</i>
April 4, 2003 5:22:23 AM

I had TeleDanmark change my IP from DHCP to a fixed IP in February. Although I was not very advanced in my networking plans, I figured a fixed IP would be easier than a DHCP lease. This they have done.

I post regulaly on a software forum, (in that case answering questions not asking them!), of which I am also one of the moderators, so I can see the IP of those who post, including myself. My IP has been the same since the 17/2/2003, and a whois against it shows the name to be blahblay.fixed.blah.blahblah or similar, don't remember the details. I don't think the external IP is changing.

Every time I have booted the router, the DHCP server here has given the same addresses to the two machines, and as I said before, if I type the internal IP of the Apache machine into the other, the page comes up, to ensure this is not a cache hit, I shut down the server, now the other machine 404's as you'd expect.

Ultimately, I don't really know enough about networking to categorically say yes or no to your suggestion, but from the evidence I have here, leads me to think that the addresses, at least, are correct.

I was reading the router article on this site which reviews the UPnP features of the 804, it talks a lot about the set up of the XP "services", I have not finished it yet, it looks a bit weird to me, but, since the other machine on the lan side of the router can see the port, does that not indicate that whatever services are necessary to expose the port are okay?

Med venlig hilsen,
adrianxw
April 4, 2003 8:01:23 AM

Hei og hopp fra Nordmann i California.
Sorry about your loss the other day, but it will be even worse when we get to Parken (I'm allowed to dream, no?).
More seriously: Where do you have the ISP address configured? If you connect through a router you will have the IP address that your ISP has given you on the external interface of the router. In fact, your internal PC's will be on a different network (usually this is 192.168.x.x on home routers). What you need to do is make the router send traffic to the Apache machine.
You need to set a port map on the router. It is usually in the manual for the router on how to do that. What you want to do is make a map that sends incoming http (port 80) to the internal ip address of your apache server (again, this usually is 192.168.x.x). If you use ssl or shttp the ports will be different (e.g. 443). I don't know if I make myself clear but it has been a long day at work.
Just ask me if there's something you don't understand...

Heia Norge!

Dev

Poor windows was not a brave soul. Threatened by the force of General Protection and Major Problem the little OS committed suicide by hanging.
April 4, 2003 11:30:19 AM

Hej Normand!

The loss was our own fault. After beating Romania 5-2 i Bucharest Saturday, and guessing Bosnia would be easy, everyone wanted to score, so when the Bosnians got the ball on the break, our defence were in the wrong penalty area!

Så, videre...

I have it set up as you say, the fixed IP is on the WAN side of the router, and the DNS for my url correctly returns it.

The router has opened port 80 on the internal IP address of the Apache machine, 192.168.0.100, as issued by the DNS. I may go to static addressing, but for now, the IP's look right. I can't see why it doesn't work.




Med venlig hilsen,
adrianxw
April 4, 2003 11:57:21 AM

the Apache machine should have a static IP, it's too risky to allow it to have dynamic.

Anyway, here's a thought: Just for testing purposes, make the Apache machine a DMZ on your router and see if it gets through. If that doesn't work there's something seriously wrong. Don't leave it that way, of course. Just report back your results here.

<i>It's always the one thing you never suspected.</i>
April 4, 2003 1:37:19 PM

This is crazy! I think it's working.

I tried setting Apache to listen to port 8000 instead, but it still failed. So I called TeleDanmark and asked them if they blocked the incoming ports, they said no, /but/ how had I connected the system up? So I told them, and they said, "you don't have a fixed IP address, you have a non-dynamic dynamic address" <fx>huh!</fx> "set your router to DHCP WAN side that'll fix it" <fx>errrrr</fx>.

Okay, so I did, cycled the power on the DSL modem, and now suddenly it works. If I type www.adrianxw.dk I can see the Apache screen, if I close port 80, it 404's.

So if you are a TeleDanmark customer and order a fixed IP, you don't get a fixed IP you get a non-dynamic dynamic IP. Pick the bones out of that. I don't know enough about it to really understand the difference. Do you understand this?

I'll set the Apache to have a fixed IP on the LAN side as you suggest.



Med venlig hilsen,
adrianxw
April 5, 2003 2:17:38 PM

I'll take a stab at this to see if I know what I'm talking about.

When you asked for a fixed IP addess, it was easier to give you a dynamic IP address that won't change on you then to tell you how to setup your router to used a fixed ip address.

If you had not changed your router settings the router's DHCP client would have gone out and asked for an IP address from the ISP's DHCP server. The DHCP server would have given you the same IP address each time your router asked for configuration information. So while your IP address doesn't change each time your router connects, it still kinda falls under a Dynamic IP range which makes it a non-dynamic for all intents and purposes but not fixed.

did I get that right?
GK

Yes, I made it past newbie w00t.
!