|
||||
IntroductionVirtual hosting is a well established practice of mapping more than one domain name to a single host platform. Since the NetKernel module system provides encapsulated URI address spaces, creating virtual hosts is quite straightforward. To use this guide you should first have read the Module Guide. Transport RequestsVirtual hosting requires that the transports you are using in your application provide you with the hostname in the URI of request they are making. The URI specification states that a server host name is the first item after the URI scheme declaration, as follows
The jetty HTTP transport always provides the host in it's requests to the Kernel. For example, a request to Jetty from a web-browser on the same host as the NetKernel installation might be
A Module is a Virtual HostSince virtual hosting is really just URI encapsulation, a module is already a generalization of a virtual host. Implementing a Virtual Host ConfigurationImplementing a virtual host configuration is very simple.
Depending on how you implement your secondary virtual host module you may wish to use a URI rewrite rule to map the external request down to the root of the module's internal address space. Here's a rule which does that <rule>
<match>.*?://.*?/(.*)</match> <to>ffcpl:/$1</to> </rule> Multiple XAR DirectoriesIf you want to keep things tidy you can make a new XAR directory for each set of modules that make up the virtual host application. These can be specified in the system.xml NetKernel configuration document.
|
||||
|
© 2003,2004, 1060® Research Limited
1060 registered trademark, NetKernel trademark of 1060 Research Limited
|
||||