Forum Moderators: phranque

Message Too Old, No Replies

Trouble browsing to domain name locally

Can browse to 'localhost' but not to the registered domain name.

         

Etruscan

12:21 am on Oct 7, 2005 (gmt 0)

10+ Year Member



I've been a designer for over a decade, but I'm new to running a server.

I'm able to browse to www.mydomain.abc just fine from any box outside my network, but not from on the network that the server is located on. If I browse to 'localhost' or '192.168.x.x' (my server's lan ip) it works fine.

I want to be able to type in my domain name and have it appear locally. I know this is something simple... but I'm missing it, obviously.

Etruscan

1:15 am on Oct 7, 2005 (gmt 0)

10+ Year Member



What I've got is this:

#
Listen 80
ServerName www.mydomain.abc:80
ServerName localhost:80

<VirtualHost *:80>
ServerName www.mydomain.abc
ServerAlias mydomain.com
DocumentRoot /html/docs/mydomain.abc
</VirtualHost>
#

The router's port 80 is being forwarded, and I'm able to browse to 'localhost' or the local IP, but when I type in www.mydomain.abc my browser reports:

"The connection was refused when attempting to contain www.mydomain.abc"

jdMorgan

1:26 am on Oct 7, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You'll need to add the domain name to your 'hosts' file (ne extension).

You won't be able to use DNS because essentially, you'd be asking your network to make both an outgoing and incoming connection simultaneously for the same request.

Add a line like

192.168.0.13 yourdomain.com

to the hosts file. Under Win XP it's usually located in C:\WINDOWS\SYSTEM32\DRIVERS\etc

You'll need to restart your browsers for this to take effect.

Jim

Etruscan

1:39 am on Oct 7, 2005 (gmt 0)

10+ Year Member



Wonderful... Thankyou!

pnllan

5:30 am on Oct 7, 2005 (gmt 0)

10+ Year Member



You can also run your own DNS server. I use Posadis on my backbone as I do not like using host files. This requires additional configuration changes on your network, albeit minor in nature. In addition, Posadis is lightweight, and can enhance apparent browser performance (since your ISP's DNS does not need to be contacted continually for domain resolution).

Just food for thought.
~

Etruscan

8:35 pm on Oct 7, 2005 (gmt 0)

10+ Year Member



I'm actually using a free DNS service (zoneedit). Since this isn't a high traffic site, I figured that zoneedit would work fine and resolve quickly enough for me.