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 want to do the following with Tomcat 5.5:

* should go to my webapp, located at the virtual host So I have a virtual host, and I want all * also go there.

Now, if I do this, it doesn't pick up the virtual host, and just goes to the default one (which is not set to

How to fix this? I basically would like to allow wildcards in the host alias, or in the virtual host name itself.

(The DNS settings are alright by the way)

share|improve this question

Have you tried adding an alias to your Host directive in the config?

<Host name="" ...> ... <Alias>*</Alias> ... </Host>

This usually fixes it for me

share|improve this answer
I used the host-manager, and when I look in the server.xml there are no hosts defined. Which config file does the host-manager webapp write to? But according to you wildcards should be possible? – Marten Sytema Jan 22 '11 at 12:52
I normally don't use the host-manager and rather write directly to the configuration files, reading about it though makes me think that the alias parameter in the manager will do the same as I was explaining just before, try it out and see how it works for you. – lynxman Jan 22 '11 at 16:27
@MartenSytema there should be at least one Host. The default one is called localhost. If you only have "localhost" then your virtual hosting may be happening in a different component, such as an Apache HTTP server before being proxied to Tomcat – Alastair McCormack Oct 7 '12 at 9:26
-1 I tried using a wildcard in the <Alias> element and tomcat didn't route requests as expected. Furthermore, the tomcat configuration docs for <Alias> mention nothing at all about wildcard support. – Asaph Jun 1 '14 at 21:17

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.