0

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?

jjczopek
  • 125
  • 1
  • 7

2 Answers2

0

Take a look at the following SFq - it actually considers the exact thing you are looking for:

icyrock.com
  • 1,190
  • 10
  • 17
  • So basically I failed with search engine :P Thx a lot. – jjczopek Dec 13 '10 at 00:30
  • :) Well, at least you have a solution - glad it's what you needed! – icyrock.com Dec 13 '10 at 00:34
  • one more question - I have set up mod_ssl and it works for my domain, but how can I setup also an SSL for hudson subdomain and eventually redirect when someone wants to access http://hudson.xyz.com to https://hudson.xyz.com? – jjczopek Dec 13 '10 at 00:41
  • You can use rewrite engine for that - take a look at these: http://www.whoopis.com/howtos/apache-rewrite.html, http://www.cyberciti.biz/tips/howto-apache-force-https-secure-connections.html or something similar. – icyrock.com Dec 13 '10 at 00:55
0

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.

  1. for hudson.xyz.com on Port 80
  2. for hudson.xyz.com on Post 8080

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

Sameer
  • 4,070
  • 2
  • 16
  • 11