Background information.
I have a server (running Debian Wheezy and Apache 2) at which I am to set up several Virtual Hosts to allow students to host their own website for development purpose. I am facing the simple option (from what I know) to host each site on a different port, making the students access their sites like this:
192.168.1.2:80
192.168.1.2:81
192.168.1.2:82
Where 192.168.1.2 is the server's local IP and :80-:82 is the ports hosting the different sites.
Although this is an approach that works out what I am actually trying to do, I think that something name based would be much more intuitive. One option is using the router's local domain name, I am not sure of how it works and I haven't got around to implement it successfully. If that worked, they could acccess their sites like this:
development.group.com:80
development.group.com:81
development.group.com:82
Where development is the server's hostname and group is the router's local domain name (DNS suffix).
What I would like to do, something that would be even more intuitive is to let each user have their own domain name (without actually having/owning one, of course). Example of how that would look:
www.exampledomain.com
www.exampledomain2.com
www.exampledomain3.com
I am thinking of implementing it by running my own DNS server, telling the router to use that DNS server and make each site hosted on the various domains.
Question.
I am not quite sure of how I could do that, so I guess the real question is: is there a best / better way of doing this and if not, how do I set up a DNS server (on the same server as the apache one) and make it reroute to the sites hosted by me?