Forum Moderators: phranque

Message Too Old, No Replies

Problem setting my apache server

         

omaroe

11:42 am on May 15, 2006 (gmt 0)

10+ Year Member



Hi folks,

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

Matt Probert

4:52 pm on May 15, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



(In deliberately simplified terms)

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

jdMorgan

10:27 pm on May 15, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Another point that should be made is that you cannot access your server by domain name using DNS from inside your own network. You will need to use a computer outside your own network to access your server by domain name. This is because a connection cannot be both incoming and outgoing at the same time.

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

omaroe

5:06 pm on May 17, 2006 (gmt 0)

10+ Year Member



this means that eventhough i can access my server from within my network using the IP address that my name servers should point at to i won't be able to access it using the domain name that i bought?

jdMorgan

5:48 pm on May 17, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



That is correct. You cannot create an outgoing connection (to the internet) that then comes back to your own network. This would be a connection that is both going out and coming in at the same time, which is impossible unless you use a proxy server on the Web to pass the request back to your network.

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

omaroe

6:40 pm on May 17, 2006 (gmt 0)

10+ Year Member



i tried to ask a freind of mine to accees my webpage from outside the network. and when he types the my sever's ip address it works but when he types the domain he gets nothing. i am affraid that there is something wrong with my server setup http.conf, or there is something wrong with my router setup?