From: Loren C. <lor...@gm...> - 2010-02-09 20:34:32
|
The .* is the default for root: <root pattern=".*" path="/"/> I just added localhost in the server-name attribute <root server-name="localhost" pattern=".*" path="/"/> Loren On Feb 9, 2010, at 02:12 PM, Joe Wicentowski wrote: > Loren, > > Very neat. One observation: In a couple of cases your @pattern was > ".*". I believe these should all be "/*", not ".*". > > Joe > > > On Tue, Feb 9, 2010 at 2:56 PM, Loren Cahlander > <lor...@gm...> wrote: >> There is an option (off of trunk version 11177) now to send web queries to >> different collections within eXist based on the server name in the URL: >> i.e. >> With the following configuration changes in controller-config.xml >> from: >> <root pattern=".*" path="/"/> >> to: >> <root server-name="site1.example.com" pattern="/*" >> path="xmldb:exist:///db/org/site1/"/> >> <root server-name="site2.example.com" pattern="/*" >> path="xmldb:exist:///db/org/site2/"/> >> <root server-name="site3.example.com" pattern="/*" >> path="xmldb:exist:///db/org/site3/"/> >> <root server-name="localhost" pattern=".*" path="/"/> >> <root server-name="site4.example.com" pattern=".*" path="/"/> >> http://site1.example.com/ would be redirected to /db/org/site1 >> http://site2.example.com/ would be redirected to /db/org/site2 >> http://site3.example.com/ would be redirected to /db/org/site3 >> http://localhost/ would be directed to index.xml in the webapp directory as >> it is normally done. >> http://site4.example.com/ would be directed to index.xml >> NOTE: The server-name attribute is optional. If it is omitted, then the >> behavior operates as normal. >> This will allow for the hosting of multiple websites in one eXist instance. >> >> I still need to work on the jetty configuration, so that the logs for each >> individual website can be separated out from the other websites. |