I currently have a LAMP (Ubuntu) server that I run in my house. My domain name is through GoDaddy. I want to have the ability to create subdomains dynamically using mod_vhost_alias.
I would also like to be able to change the DNS A-records of subdomains (for services like droplr).
Is this possible? Do I need to create a DNS on the server? Is it even possible to push my GoDaddy domain to it since it requires two IP addresses?
1: Do I need to create a DNS on the server No. You can use the GoDaddy DNS servers(maybe -depending on what type of IP address you have) see this
BUT - This is dependent on whether or not you have a static or dynamic IP address from your ISP. If you didn't specifically order a static IP, then there's a 99% chance yours is dynamic which means it will probably change every time your router or modem reboots. <- this will require a solution before this will work.
Sorry if I'm telling you something you already know.
2: Why do you require 2 IP addresses? Unless there is something I'm not seeing, one IP address can serve many many virtual web sites.
So let me know if your IP is static or dynamic. If dynamic, what brand/model router are you using because come have built in support for dynamic IP addresses.
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:
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).
This is obviously not scalable in the long run.
It's not a big deal if your IP changes and you are there to update your A-records to follow this, or by using a dynamic DNS updater.
Try Afraid.org for the DNS service. I've been using them - free, fast, easy to use, and reliable.
You need to set a wildcard dns entry to be able to dynamically create subdomains on the fly (though what you're really doing is telling your DNS provider is to send EVERYTHING to your server, and weeding out with vhosts). This shouldn't need a seperate dns provider.