Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have installed Tomcat 6 and Jenkins. I can connect to it via http://localhost/jenkins, but i want to access it directly via http://localhost. How can I archive this? My complete setup includes a host computer with Apache2 installed and it routes several subdomains to virtual machines. So if it is easier to do it in Apache, I could do it too, but I would prefer the first solution.

I am completely new to the Java and Tomcat world, so this might be pretty easy, but I didn't got it.

share|improve this question
up vote 1 down vote accepted

You need to use URL rewriting. These two posts from stackoverflow: link 1, link 2 suggest to use URLrewriteFilter.

Any easier option may be to run your webapp as ROOT webapp in tomcat. See this post on how to do so.

share|improve this answer
Sorry, im to stupid to get says something about context dir and web-inf dir in the install guide. I have never heard it. :( – Abenil Apr 2 '12 at 13:54
Isn't it possible to just tell tomcat to start jenkins if / is called? Or can i configure jenkins to start on / instead of /jenkins? The standalone Jenkins was working with no /jenkins added, after some configuration. – Abenil Apr 2 '12 at 14:04
@Abenil: Edited the answer. – Khaled Apr 2 '12 at 14:51
thanks i got it. ;) – Abenil Apr 4 '12 at 7:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.