I am totally new to the DNS and server hosting world and not quite sure what I need.
I want to get a domain, forward it to my own server, so that the user sees example.com in the url bar and example.com/foo/bar will work. Depending on what subdomain it is, it should do different things (another base-directory at webserver, ftp, etc). Also my email should be able to be sent to and received by that server.
What irritates me, is the fact, that in the A-record I can only list IP-addresses and no ports. So do I have to set up a nameserver on my own server? Or do I accomplish this via vhosts on my webserver?
I would appreciate any help or link to a tutorial.
I know how DNS works, know some basic apache-stuff, etc... so no need to explain that.