Masking other peoples TLDs over my urls with CNAME (a la GitHub pages)

view story

http://serverfault.com – If I wanted to let users use their own domains for their profile page on my site (like GitHub pages does) how would I actually do this? What technologies would be required? I would appreciate it if someone could give me a (reasonably) high level overview. Thanks (HowTos)