[jboss-user] [Installation, Configuration & DEPLOYMENT] - need to configure wildcard subdomains for a virtual host in

mkuehle do-not-reply at jboss.com
Mon Aug 17 11:41:11 EDT 2009


Hi,
is there any chance to configure a virtual host in JBoss 5.1 to redirect any subdomain to one configured virtual host. Examples of the subdomains:
sub1.domain.tld
sub2.domain.tld
sub3.domain.tld
subn.domain.tld

The goal is to read a subdomain as configuration element in a servlet filter and give the caller his personal view to the application in ervery request. But unfortunately the Alias alement can't handle wildcards:


  | <Host name="vhost-name" autoDeploy="false" deployOnStartup="false" deployXML="false">
  |   <Alias>domain.tld</Alias>
  |   <Alias>*.domain.tld</Alias>
  | </Host>
  | 

The jboss-web.xml configuration is:

  | <jboss-web>
  |   <context-root>/</context-root>
  |   <virtual-host>vhost-name</virtual-host>
  | </jboss-web>
  | 

The URL http://domain.tld:8080/ works fine but it doesn't work with any subdomain e. g. http://sub4.domain.tld.

Is there any way/chance to solve this with JBoss 5.1? Or does a solution with apache 2.2 and mod_rewrite and/or mod_jk exist for this problem?

Any hint is welcome =)

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4249990#4249990

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4249990



More information about the jboss-user mailing list