Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have bought a domain lets say it, 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 so it points to my ip in order to serve the page.

share|improve this question
Out of curiosity, is this static IP you claim to have a 192.168.x.x address, or a 10.x.x.x address? – Thomas Ward Jun 16 '11 at 13:55
its a public static ip like not the internal ones. – topless Jun 16 '11 at 13:57
ah, very good. wanted to make sure it was actually static xD – Thomas Ward Jun 16 '11 at 14:03
Try looking into this link It MAY give you an idea as to what needs to be done. – Nitin Venkatesh Jun 16 '11 at 14:19
This might be a good resource for you. – ændrük Jun 16 '11 at 15:21
up vote 5 down vote accepted

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.

share|improve this answer
My host master keeps throwing me a message when I am trying to pass my ip as a nameserver. How can I map my ip into something like – topless Jun 16 '11 at 13:58
@Chris-Top you'd need to use a DNS services provider, then. I'd recommend zoneedit, or another free DNS service provider, because your ISP may be looking for an actual DNS records server to be at the location (hence how the system processes records). First, you should make sure you're familiar with how DNS works. I dont have a link to any reference material at the moment though. – Thomas Ward Jun 16 '11 at 14:01
@Chris-Top I'm actually in the AU chat rooms fairly often, if you want to discuss this further, find me there, esp. if you need some real-time assistance. I run one site off of 3 different servers, so I'm relatively familiar with the basic setup steps. – Thomas Ward Jun 16 '11 at 14:04

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

share|improve this answer
Not necessary if the system only hosts one site. If they want more than one site, then they will need to modify the config files. – Thomas Ward Jun 16 '11 at 14:02
I have done my research about setting virtual hosts, and thanks for the info, but my issue is I can't go global, everything else from there its pretty much set up. – topless Jun 16 '11 at 14:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.