Configuring Virtual Hosts for Web Applications

Chapter 2 - The Structure and Deployment of Web Applications

    Configuring Virtual Hosts for Web Applications

  • Configuring Virtual Hosts for Web Applications

    WebLogic Server supports two methods for configuring virtual hosts for Web applications:

    • channel based

    • host based

    Configuring a Channel-based Virtual Host

    This is an example of how to configure a channel-based virtual host:

    < VirtualHost Name="channel1vh" NetworkAccessPoint="Channel1" Targets="myserver"/ >
    < VirtualHost Name="channel2vh" NetworkAccessPoint="Channel2" Targets="myserver"/ >

    Where Channel1 and Channel2 are the names of NetworkAccessPoint configured in the config.xml file.

    NetworkAccessPoint represents the dedicated server channel name for which the virtual host serves HTTP requests.

    If the NetworkAccessPoint for a given HTTP request does not match the NetworkAccessPoint of any virtual host, the incoming HOST header is matched with the VirtualHostNames in order to resolve the correct virtual host.

    If an incoming request does not match a virtual host, the request will be served by the default Web server.

    Configuring a Host-based Virtual Host

    This is an example of how to configure a host-based virtual host:

    < VirtualHost Name="cokevh" Targets="myserver" VirtualHostNames="coke"/ >
    < VirtualHost Name="pepsivh" Targets="myserver" VirtualHostNames="pepsi"/>

© 2015 by Learncertification All Rights Reserved. The certification names are the trademarks of their respective owners. Terms & Privacy Policy