Bug 7676 - Allow name property to use match experssions in <host> tag, or <alias> tag
Summary: Allow name property to use match experssions in <host> tag, or <alias> tag
Status: RESOLVED DUPLICATE of bug 18500
Alias: None
Product: Tomcat 4
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 4.0.3 Final
Hardware: PC All
: P3 enhancement with 2 votes (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-04-02 01:15 UTC by Eugene Engelgau
Modified: 2010-02-04 12:26 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Engelgau 2002-04-02 01:15:28 UTC
It would be very usefull to allow the host block to be selectable by a name 
proerty using regular experssions.  That way an entire class of host names can 
be mapped to a virtual server.  For instance in my example below, this Host 
section is selected if we have all of these:

m1.mydomain.com
site1.m1.mydomain.com
site2.m1.mydomain.com
m2.mydomain.com
site1.m2.mydomain.com
site2.m2.mydomain.com

See below for config.  

===================================

      <Host name="*.m1.mydomain.com" debug="2" appBase="d:/http/my_content" 
              unpackWARs="true">
          <alias>m1.mydomain.com</alias>
          <alias>*.m2.mydomain.com</alias>
          <aliasm2.mydomain.com</alias>
           
        <!-- Context -->
		<Context path="" docBase="d:/http/my_contentden"   
             reloadable="true" crossContext="true" debug="2"/>	
      </Host>

========================

We host as many as 500 virtual sites on a server and need this so we can map 
all sites to the same content area, and add them without changing the 
server.properties file.  The application looks at the host request header value 
to make the final determination on how to treat the content.

Gene Engelgau
Comment 1 Eric Kobrin 2007-05-11 05:23:23 UTC
This would still be a useful feature in the latest tomcat.
Comment 2 Mark Thomas 2010-02-04 12:26:39 UTC

*** This bug has been marked as a duplicate of bug 18500 ***