5

I have bought a domain lets say it example.com, I also own an Ubuntu 10.04 machine which I would like to use it to serve my personal website. I have deployed the website on my local machine and its set with a static IP address which I can access like http://xx.xx.xx.xx

What I would like to do is connect my domain name example.com so it points to my ip in order to serve the page.

Lekensteyn
  • 178,446
topless
  • 7,465

2 Answers2

4

Start by modifying your domain's DNS settings in the registrar's control panel and provide the nameserver as the static IP you claim to have. Doing this (then waiting approximately 24 hours for DNS to update worldwide) should then allow you to type in the domain and get to your site under the following conditions:
(a) The system is web facing, and your firewall has been configured to allow port 80 traffic to reach your system, or
(b) Port 80 (the normal HTTP port) has been opened in the NAT'd gateway that may exist between your system and the actual internet connection (for example, a router that forwards port 80 to your machine), and the same port has also been allowed in your computer's firewall.

Thomas Ward
  • 78,878
1

You will need to add an 'A' record to the DNS Nameserver for your domain that points to the IP address of your external internet connection.

You must make sure that you have a static external IP address. If you are using NAT on your router you will also need to make sure you add a Port Forwarding rule to forward anything coming in on port 80 to your server.

That will get the traffic going to your server.

You will then need to add your domain to the apache config file ( httpd.conf ). If you want to host more than one site you will need to switch on namebased virtual hosts

DotMH
  • 11