virtual host example

This commit is contained in:
Greg Wilkins 2013-04-15 12:29:08 +10:00
parent 2e5dd6b442
commit 4e3c7367af
2 changed files with 6 additions and 2 deletions

View File

@ -303,7 +303,8 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu
*
* @param virtualHosts
* Array of virtual hosts that this context responds to. A null host name or null/empty array means any hostname is acceptable. Host names may be
* String representation of IP addresses. Host names may start with '*.' to wildcard one level of names.
* String representation of IP addresses. Host names may start with '*.' to wildcard one level of names. Host names may start with '@', in which case they
* will match the {@link Connector#getName()} for the request.
*/
public void addVirtualHosts(String[] virtualHosts)
{

View File

@ -45,7 +45,10 @@ detected.
<!-- virtual hosts
<Set name="virtualHosts">
<Array type="String">
<Item>www.myVirtualDomain.com</Item>
<Item>www.MyVirtualDomain.com</Item>
<Item>m.MyVirtualDomain.com</Item>
<Item>*.OtherVirtualDomain.com</Item>
<Item>@ConnectorName</Item>
<Item>localhost</Item>
<Item>127.0.0.1</Item>
</Array>