I'm running apache server on my machine and let's say I'm using domain xyz.com. I have a Hudson CI server running on the same machine on it's default port 8080. I'd like to make it accessible by hudson.xyz.com. What I have to do to point this subdomain to 8080 port?
Take a look at the following SFq - it actually considers the exact thing you are looking for:
It can be very easily be done by using Apache redirect
http://httpd.apache.org/docs/2.0/mod/mod_alias.html#redirect
Have two virtual hosting sections for the domain you wish to redirect.
Now in the Port 80 section put a redirect rule
This link has couple of redirect examples, you can figure out what suits you.
http://borkweb.com/story/apache-rewrite-cheatsheet