Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have bought my TLD domain, say domain.com. What I'd like to do is to host the website available under this address on my own computer. I'm assigned a dynamic IP, and I'm also behind a router in my local network. I'd run sites on my ubuntu server on a virtualbox machine which is available in my local network.

Preferably, I'd like to have my own domain on some server, with which I could experiment as much as I need (so it's only for educational purposes), but I can't afford to buy such a service.

Is it feasible? Can you provide steps I'd need to take to configure it (could be just general explanation). I'd need some guidance, please.

share|improve this question
add comment

3 Answers 3

up vote 0 down vote accepted

With a setup like yours, you'll need :

  • A dynamic dns entry.
  • setup PAT redirections in your router
  • use some kind of vhosts on your webserver (if multiple sites)

Regarding the dynamic dns, I see two solutions :

  • A DNS server, maybe at the registrar, that will be authoritative for you domain, and to which you will update with the ip address
  • a free dynamic dns service (dyndns, no-ip) that you will update (maybe with your router), and domain.com will be a CNAME of that dynamic dns.
share|improve this answer
    
I have my server available at some public IP - just set up DMZ in my router pointing to my virtualbox ubuntu server that works in my LAN. I understand the second solution, but I guess rolling with this one, don't I lose configuration possibilities, like setting virtual host? And could you explain the first solution a bit? I don't know if my registrar thought of an interface to receiving ip address updates or else how would that work? –  Pawel Dec 30 '10 at 0:18
add comment

I run a very similar set up. The secret to running a server on a VM, is to stop thinking of it as a VM. I'm currently using my own domain name, and zoneedit to manage my domain names, with a fairly custom hackish dynamic dns script (my ISP has some wierd transparent proxy that totally messes with most dynamic dns clients - i scrape my ip address off the router, and pass it on to zoneedit). They have clients for that, and the advantage is you can use your own domain name at no cost.

DMZ isn't the best solution - open up and forward ports to the VM at the router as needed. Its more secure.

virtualhosts arn't an issue except for web hosting - you do it the same way you would do it for any system - point the domain names at the server ip, and the rest is handled at the application level.

share|improve this answer
add comment

I recommend sticking to the second solution from petrus, since it is the easiest in your case.

It does not stop you from using virtual hosts because you can set as many CNAME entries to point to your single dynamic dns entry. If your DNS host allows wildcard entries, you can serve every sub-domain off your home server, with only configuration of virtual hosts in your webserver.

Another important part of the equation is getting your Virtualbox servers accessed from the outside. You will need to make sure that your router can talk to your VM. This may involve bridging your VM network interface to the host machine's LAN interface, that is connected to the router.

[Internet]---dyn ip---[router]---internal ip---[host server]---bridge---[virtualbox vm]

Just need to be careful with the networking part. It catches some people.

share|improve this answer
add comment

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.