tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 51269] New: Enhancement: Allow Alias to support wildcards
Date Thu, 26 May 2011 12:59:43 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=51269

             Bug #: 51269
           Summary: Enhancement: Allow Alias to support wildcards
           Product: Tomcat 5
           Version: Unknown
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: xandrewrampulla@gmail.com
    Classification: Unclassified


I would like my tomcat instance to be able to respond to multiple DNS
subdomains without having to explicitly specify those subdomains.  For example
I would like to be able to create an alias that looks like

         <Host name="myapp" >
            <Alias>*.myapp.mycompany.com</Alias>
         </Host>

With this configuration, the server should respond properly to 
a.b.c.myapp.mycompany.com
b.c.d.myapp.mycompany.com
c.d.e.myapp.mycompany.com
etc.

This seems like it could be done easily by changing
org.apache.catalina.connector.MapperListener:registerEngine so that instead of 
    if (aliases[i].equalsIgnoreCase(defaultHost)){
        isRegisteredWithAlias = true;
        break;
    }
we instead did something like
    if(Pattern.matches(alias[i].toLowerCase().replaceAll("\\*", ".*?"),
defaultHost.toLowerCase())) {
        isRegisteredWithAlias = true;
        break;
    }

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message