Forum Moderators: phranque
I have set an new apache server on my computer. I bought a domain name. I have a little problem which is when i try to access my web page from the ip address it works fine. but when i try to access it from the domain name that i bought it doesn't. Although i have the domain name pointing at my ip address. i read the manual about servername but i don't fully understand it. it seems to me that there is something missing or i don't get it. if you please help me i would really appreciate it.
thanks
The domain name you bought is just a token that is translated into the IP address behind the scenes when you enter it into your web browser.
The IP addreses assigned to IP addresses are held in directoris called DNS, and there are lots of these all around the world which are updated maybe twice a day. Its a big job and usually takes a couple of days for a new or changed assignment to propogate around.
If you wait a few days you should find your web site is accessible via your domain name. If not, then you have a problem with the assignment of the IP address to your domain name and you might like to contact your registrar for help.
Matt
You *can* set things up to use your domain name from inside your network, but using a different mechanism from DNS. Get DNS and outside access working first, and then add an entry to your local machines' hosts files to define the domain within your network.
Jim
In order to use your domain name within your local network, you'll need to create an entry in your 'hosts' file (just 'hosts' with no file extension). The location varies depending on operating system and version, but you can find it by searching your hard drive. For example on my Win XP Pro SP2 machine, it's located at C:\WINDOWS\SYSTEM32\DRIVERS\etc
The entries in hosts look like this:
127.0.0.1 yourdomain.com
192.168.0.1 yourdomain.com
The first line is for use on the server machine itself, while the second line would be used on other computers on your local network, and should point to the correct fixed IP address assigned to your server. On Windows, there is often a file called "hosts.sam" with samples of how to do it.
Jim