Virtual Hosts Configuration with Weblogic Server

Virtual Hosts

Virtual hosting, which defines a set of host names to which WebLogic Server instances (servers) or clusters respond. When you use virtual hosting, you use DNS to specify one or more host names that map to the IP address of a server or cluster.

When you deploy the application on virtual host, it means you hide the IP address of the servers which are actually going to serve the requests.

It can either be targeted to one individual server or the whole cluster.

In my example, I have configured a virtual host for the admin server. Below are the steps we need to follow:

1)    The first requirement for creating a virtual host is to create a network channel on the admin server.
–    Go to the admin console, click on servers -> admin server
–    Go to the Protocols -> Channel tab
–    Give the name of the channel as port-80, choose the protocol as http.
–    Give listen address as localhost, give the listen port as 80. Leave the external listen address and port bank.
–    Enable HTTP tunneling as per your preference.
–    Leave the security part as it is to the default unchecked values.
–    You will see the below configuration once the channel is created.

– Restart the server to confirm that the server is using the default channel and port-80 channel.

2) Once the network channel is created, go to Environment -> Virtual hosts
– Click on new, give a name to the host vh.localhost.org.
– Now click on the virtual host vh.localhost.org, give the below values:
Virtual Host Names:  vh.localhost.org
Network Access Point Name: port-80

–    Click on targets tab, check the admin server.
–    Save the changes and restart the server.

3)    Now we need to modify the windows host file in C:\WINDOWS\system32\drivers\etc directory and add the host name vh.localhost.org which we have specified for the virtual host. Add the below in the file:
127.0.0.1    vh.localhost.org

4) Now deploy one test application following the below steps:
– Click on deployments
– Click on install -> Choose the application from the path
– Click next, check Install this deployment as an application -> target it to the virtual host (not the server)

– Click finish

Deployment state should be active.

Now access the application using the url:

http://vh.localhost.org/web-app

You should see the welcome page of the application.

Latest Comments

  1. Amarender November 24, 2010
    • divya December 4, 2010
  2. Robb December 4, 2010
    • divya December 4, 2010
  3. Kiran December 13, 2010
  4. divya December 15, 2010
  5. Divya December 15, 2010
  6. divya December 15, 2010
  7. madhukar December 22, 2010
    • divya December 23, 2010
  8. madhukar December 23, 2010
  9. divya December 29, 2010
  10. siva December 30, 2010
  11. madhukar Gunda January 4, 2011
  12. Annie January 14, 2011
  13. Rennay January 25, 2011
    • Administrator January 26, 2011
  14. Kishor March 14, 2011
  15. ananth April 12, 2011
    • divya April 19, 2011
  16. Ram August 6, 2011
    • divya August 8, 2011
  17. ananth August 7, 2011
    • divya August 8, 2011
  18. sambasivarao April 9, 2013
    • Administrator January 16, 2014
  19. Prajitha Nambiar July 31, 2013
    • Administrator August 13, 2013
  20. Alyssa August 3, 2013
  21. Sunny September 4, 2014
    • Administrator September 8, 2014

Leave a Reply