Offer Custom URLs using CNAME
For the virtual hosts solution to work, you will still require a CNAME entry. Your DNS manager should allow you to enter a wildcard entry (where @ is yourdomain.com):
*.yourdomain.com => @
Otherwise, will will need to to enter your subdomain list manually:
a.yourdomain.com => @
b.yourdomain.com => @
Hopefully, your DNS is preconfigured with a wildcard, although probably not. If you cannot resolve your subdomain after setting up your virtual hosts, then you will know why.
If you post which server you're using (IIS, Apache, etc) more specific instructions could be given on setting up virtual hosts.