Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

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 W. Jun 16 '11 at 13:55
    
its a public static ip like 77.50.60.12 not the internal ones. –  topless Jun 16 '11 at 13:57
    
ah, very good. wanted to make sure it was actually static xD –  Thomas W. Jun 16 '11 at 14:03
1  
Try looking into this link It MAY give you an idea as to what needs to be done. –  nitstorm Jun 16 '11 at 14:19
    
This might be a good resource for you. –  ændrük Jun 16 '11 at 15:21

2 Answers 2

up vote 3 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 ns1.iamcool.com? –  topless Jun 16 '11 at 13:58
1  
@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 W. 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 W. 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 W. 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

 
discard

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.