What is Virtual Host in Weblogic , how to create it & what
is the advantage ?
Answer Posted / ram
Virtual Hosting a web application in weblogic 10
>
Here are the steps how to create a name based virtual host
in weblogic server 10 and how to deploy a web application in
the virtual host using weblogic console.
>
>
Step 1: Create new network channel
>
You must be aware that a network channel is like a network
connection in weblogic. A network channel is a unique
combination of listen address, listen port, and protocol.
>
In order to create a virtual host you first need to created
a network channel.
>
Go to console -> left pane -> wl_server -> Environemnt ->servers
>
-> Click Local & Edit
>
Right pane:
>
-> Go to 'exampleServer' -> protocols -> channels
>
-> Click on Lock & Edit
>
-> Click New
>
-> Enter following details for channel.
>
Name="mychannel", protocol=http
>
Listen address = 127.0.0.1, Listen Port = 7003,
>
Leave External Listen address and Leave External Listen Port
blank
>
-> Click on 'Finish'
>
-> Save changes
>
-> Activate changes
>
Note: After this step you have created a network channel.
That means your server
>
will listen at given listening address and port. Try
accessing http://127.0.0.1:7003
>
Step 2. Create new virtual host
>
Go to console -> left pane -> wl_server -> environement ->
virtual hosts
>
-> Click lock & edit
>
Right pane :
>
-> Click on New
>
-> Enter Name 'myvh'
>
-> save changes
>
-> Activate changes
>
Note: After this step a virtual host is created. It does not
mean anything unless you configure the virtual host as shown
in the next step.
>
Step 3: Configure virtual host
>
Go to console -> left pane -> wl_server -> environement ->
virtual hosts
>
-> Click lock & edit
>
Right pane:
>
-> Click on 'myvh' virtual host link in the 'Virtual Hosts'
table.
>
-> Enter 'myvh.oracle.com' in the 'Virtual Host Names' text box.
>
-> Enter 'mychannel' in the 'Network Access Point Name' text
box.
>
-> Save changes.
>
-> Click on 'Targets' tab.
>
-> Select 'exampleServer' in the 'servers' section.
>
-> Save changes.
>
-> Activate changes
>
Step 4. Deploy application to virtual host
>
Go to Console -> left pane -> wl_server -> deployments
>
-> Click lock & edit
>
Right pane:
>
-> Click on 'Install'
>
-> Click on "upload your files" link
>
-> Click "browse" (against 'deployment archive' )
>
-> select "sample.war"
>
-> Click "Next"
>
-> Choose 'sample.war' in the "location" section
>
-> Choose "Install this deployment as an application" radio
button
>
-> Click on "deployment targets" tab
>
-> select 'myvh' -> Next -> Next -> Finish
>
-> Save changes
>
-> Activate changes
>
>
Step 5. Create DNS entry in your hosts file.
>
For linux hosts file is: /etc/hosts Append the following
line to the file as super user.
>
127.0.0.1 myvh.oracle.com
>
Save the changes to 'hosts' file.
>
>
Note: Just saving the changes to 'hosts' file is enough to
activate the DNS entry.
>
>
Step 6. Start the application.
>
Go to Console -> left pane -> wl_server -> deployments ->
>
Right pane:
>
-> Select 'sample.war'.
>
-> click on 'Start'.
>
-> Complete the start process.
>
>
Step 7. Access the virtual hosted application.
>
Now you should be able to access the following url only from
the machine where you modified the 'hosts' file as mentioned
above. http://myvh.oracle.com:7003/sample/
If you want to use access the above url from any machine,
appropriate DNS entries need to be created by your network
administrator in your network Router.
Cheers,
Ravindran.
Is This Answer Correct ? | 6 Yes | 1 No |
Post New Answer View All Answers
What is meant by cluster??
How to integrate appache with weblogic?
How many way to start and stop weblogic servers?
I configured the messaging bridge to use the exactly-once quality of service for two-phase transactions. So why am I getting a quality of service is unreachable error? : BEA Weblogic
What is the purpose of stub in web-logic server cluster?
Which are the benefits of mdb (message driven beans) over standard jms consumers? : BEA Weblogic
What is bea weblogic? : BEA Weblogic
Explain how a web logic server works?
Explain what are the databases that are available to be used with the web logic j2ee connector architecture?
What is a Thread dump? How will you take in unix/linux and windows ?
How do I configure jms security? : BEA Weblogic
what are the gbx,gdb and other tools in linux for core dump,and how to configure stdout,stderr..what is the difference between stdout ,stderr and coredump. how to create core dump and view that one? please can anybody explain me?
What is t3??
Can I enable requests to a jdbc connection pool for a database connection to wait until a connection is available? : BEA Weblogic
What is bootup process?