Forum Moderators: mack

Message Too Old, No Replies

Problem viewing a site hosted on my own network.

Looking for help for configuring server

         

tecsun

5:47 am on Apr 6, 2005 (gmt 0)

10+ Year Member



I'm using Aztech DSL600EU, with Apache installed (Port 80 ), and using a dynamic dns service to host my own website.

But, when i type my address into my IE, it direct me to my router configuration page. Why? Even the connection is made from my friend computer, it also ask for password, sth like it has redirect my friend to my router configuration page.

I have already set port fowarding for port 80. Even if I use DMZ server. Supposed my router has no problem, it is brand new one.

What I'm thinking is I can't view my own site on the same computer(which act as the server). Am I right? But my friend say his one can...

Thank you very much. :D

[edited by: mack at 12:47 pm (utc) on April 6, 2005]
[edit reason] removed specifics. [/edit]

mack

12:53 pm on Apr 6, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Hi tecsun,

This is quite an anoying issue. I am in the same boat because I host from home. Im my case I have a fixed ip but the same problem exists.

In simple terms it is because you are behind the router and want to see your servers from an outside point of view. It's a bit like being in a house and trying to post a letter to yourself.

The easiest solution is to use the host file on your pc to map any external requests to internal ip addresses.

so lets imagine your webservers lan ip is 192.168.x.x place the following in your hosts file.

www.example.com 192.168.x.x

Under windows xp your host file should be

c\windows\system32\drivers\etc

If your pc is the machine you are using as a webserver then you can also go to [localhost...] to view the site.

Hope this helps.

Mack.

Edit for typo

[edited by: mack at 2:11 pm (utc) on April 6, 2005]

txbakers

1:55 pm on Apr 6, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Of all things to try to teach, I found this issue to be one of the most difficult.

I was also in the same boat - I hosted at home, had the router/firewall in place and couldn't see my own sites.

I learned about the host file trick and all was well.

But to try to explain it to someone was very difficult. Why couldn't I go out to the web and come back to find the site? It worked on my Mac just fine.

Did you come up with a good, clear way to explain why it wouldn't work? I just gave up and accepted it, and taught it that way.

mack

2:09 pm on Apr 6, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



A Have tried to explain this to a few people why I need to use the host file but it's it s difficult thing to try and explain. Posting a letter to yourself from inside your house is probably the best analogy. :)

Sometimes I explain it by telling people an external address can come to the router via your ip.. the router then handles it based on port and forwards it to your lan server. But from inside the lan it's different. Almost like picking up your phone and trying to call yourself :)

So even if you go to a domain you host localy.. in effect the router will still see you based as internal traffic, even although in theory you are connecting from the outside.

Mack.

edit for typo

[edited by: mack at 2:18 pm (utc) on April 6, 2005]

txbakers

2:16 pm on Apr 6, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I like the picking up the phone one too.

I always show people how your lan machine can't find the Wan by having them Ping the WAN address.

I suppose a TCP/IP expert might be able to truly explain it.

mack

2:19 pm on Apr 6, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



I think in general the easiest way to explain it would be to say the router is designed to handle all requests pointed at it from inside the network as a request for the router it's self. It only lets external traffic pass though it (based on peramiters).

Mack.

tecsun

6:58 am on Apr 7, 2005 (gmt 0)

10+ Year Member



then is that mean by changing the host file, this problem can be solve? or there is no solution currently for this problem?

because... I have changed my host file, added
192.168.1.2 tecsun.myftp.org
(192.168.1.2 is my PC ip) into the host file, but seems it wont redirect me to my webpage, still the router page.

:(

txbakers

12:24 pm on Apr 7, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



you need to open the ports of your router as well to point to the web PC

mack

1:18 pm on Apr 8, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Hi again,
txbakers has made a very vald point and one we seam to have overlooked towards the start of this thread.

Think of your router as a filter. It's software id designed to only let certain traffic through.

From within your eouters admin area you shoudl have an option. Usualy called port forwarding, or firewall settings.

What you need to do it set it up so that any traffic on port 80 gets directed to th eip of the computer hosting your server.

YOu also need to make sure the web server has been configured to listen on port 80.

Try this and let us knwo how you get on.

Mack.

tecsun

3:16 pm on Apr 10, 2005 (gmt 0)

10+ Year Member



I have forwarded the port 80... but donno my web will go through port 80 or not(but in usual way, it will, rite?!)...

Anyway, I got this reply from my router manufacturer, haiz... I think I'm hopeless in this issue... is it?

Dear customer,

For your information, as long as you have done the port forwarding
correctly, the port will be forwarded to the host IP which you specified.
Make sure during the time when you test the port forwarding feature, you are
not using any of your LAN computer to test it as the DSL600EU doesn't
support loopback address, which mean you must use another external
connection to connect to your DSL600EU public IP address in order to test
the port forwarding.

Also make sure the necessary access control has been enabled.

Regards

mack

4:29 pm on Apr 10, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



in generlal all http requests will attempt to connect on port 80. So if you point port 80 to the lan ip of the computer hosting your site it should work.

Loopback goes back to what we where saying earlier on. You wont be able to view your site using your www address from within your network unless you modify your hosts file.

You should however be able to access it from the outside world.

Mack.

tecsun

10:51 am on Apr 18, 2005 (gmt 0)

10+ Year Member



hey, i don't know why, my host-file is working now once i add 127.0.0.1 rad.msn.com into the host-file... yeah~! thank you everybody! :lol: :D