I would strongly suggest that you get a cheap web hosting VPS first before trying this. At best, most ISPs don't' care too much about people hosting web sites at home without a business account. Worse case, your account can be suspended.
Putting aside that, if you do want to host your web site at home, do NOT presume that your IP will not get changed. Instead, get yourself a Dynamic DNS provider like these guys:
http://dyn.com/dns/
Which will update your DNS to your IP automatically when it changes (using either a script to a software client on your home computer). That said, charges for additional subdomains may apply. You will need to review their pricing and see if they will fit your needs.
However, if you are not planning to have your domain be exposed on the internet, you can setup your DNS yourself and use whatever domain you want, using either BIND, DNSMasq or other DNS software. NOte that DNS configuration itself even for the easiest software packages will take some work.
Finally, if you really don't want to mess with DNS and you just want to learn how to use Apache, just update your host file on your home computer when connecting to your Ubuntu box with the subdomains in question. So if you have a domain call foo.bar.com on your ubuntu box 192.168.15.10, add the following in your host file (I am using my Mac as an example).
192.168.15.10 foo.bar.com
This is obviously not scalable in the long run.
I have a dynamic IP... but it NEVER changes. In 3 years it has changed 1 times other than me moving. I thought if i hosted a DNS i needed to IP address.
I want to be able to create dynamic subdomains. As in create a new folder and it is a subdomain. That is the first problem. The second problem is that I want to be able to have a subdomain like share.mydomain.com that I can change the A-Record to point to droplr to use their custom domain service. I am sorry for so many question. I'm terrible with Apache and want to learn. – None – 2011-09-05T01:11:06.000
Ok, then go look up how to use the GoDaddy DNS servers in the link I posted earlier. For example, in the GoDaddy DNS admin, you'll create a new host called share under your domain of domain.com. Then give the newly created host an A record with the IP of your router. Set up http forwarding on your router, then configure Apache to handle the virtual hosts. Let me know if you need clarification on any of those steps. But first things first, set up the DNS at GoDaddy. – None – 2011-09-05T01:25:57.320