(Cross-posting to [email protected]) >>>> On Tue, Apr 27, 2010 at 12:24 PM, Markus Blaurock <[email protected]> wrote: >>>>> currently we have the need to run multiple websites on the same >>>>> sling-instance. That is, serving the same or similar content in >>>>> different ways, defined by the hostname. >>>>> For this we would like to have a single pool of sling-app-servers and >>>>> each one should be possible to serve all websites. Otherwise we would >>>>> need to have one pool for each (small) site, which is not feasible. >>>>> >>>>> Our solution was to patch the sling SevletResolver (2.0.9) to accompany >>>>> each entry in the search-path with a hostname (defined by a regular >>>>> expression). >>>>> Resolving a servlet would now evaluate the hostname to "create" a >>>>> specific search-path for this hostname (with entries valid for this >>>>> hostname). >>>>> Probably this could be named "virtual hosts"? >>>>> >>>>> Whith this some questions arise for us: >>>>> >>>>> 1. does somebody have a similar requirement of running multiple websites >>>>> on the same sling instance? Somebody like to share experience? >>>>> >>>>> 2. is there another possible (easier?) solution for our problem? >>>>> >>>>> 3. would this be a feature for sling in general? >>>>> >>>>> What do you think?
>>> Vidar Ramdal schrieb: >>>> Already Sling supports at least parts of your requirements. >>>> Take a look at: >>>> http://sling.apache.org/site/mappings-for-resource-resolution.html >> On Tue, Apr 27, 2010 at 1:25 PM, Markus Blaurock <[email protected]> wrote: >>> we thought of that, but it only works for the first request coming >>> from the server. e.g. if we include another resource inside a resource >>> then the hostname is no longer available and the default servlets will >>> be found. >>> >>> The ResourceResolver.resolve()-Method gets called with null >>> HttpRequest-Parameter >>> (in Sling-Jsp-Tag-Support) - the >>> ServerletResolver.resolveServlet()-Method gets called every time with >>> the HttpRquest and we just used it. > Vidar Ramdal schrieb: >> Ok, so you want not only host-specific content, but also host-specific >> rendering (servlets and scripts) - is that right? >> >> In that case, you'll currently have to roll your own ServletResolver, >> but I'd say such a feature would be a nice addition to Sling. >> >> Felix has written up a draft for a "multitenancy" concept, that you >> might find interesting: >> https://cwiki.apache.org/SLING/multitenancy-support.html On Tue, Apr 27, 2010 at 2:25 PM, Markus Blaurock <[email protected]> wrote: > yes, exactly, host-specific-rendering. > > The "multitenancy" concept also perfectly fits our problem. > > How can this concept change its status from DRAFT to "we will do it like > this" ? You can start by filing a "new feature" issue at https://issues.apache.org/jira/ - and then, hope that someone picks it up, or start coding yourself :) If you can come up with a backwards-compliant patch, IMO it will have a good chance of being accepted. -- Vidar S. Ramdal <[email protected]> - http://www.idium.no Sommerrogata 13-15, N-0255 Oslo, Norway + 47 22 00 84 00 / +47 21 531941, ext 2070
