To Create & Test a Virtual Host

1. Edit your hosts file and map your domain / DNS name to the server ip address. 
Unix - /etc/hosts
Window - C:\WINDOWS\system32\drivers\etc\hosts

In Window entry should be like below -
127.0.0.1       localhost lakshmiweblogicadmin.blogspot.com


2.Create a virtual host, Click on Virtual Hosts, New, Enter name for virtual host.

3.Click on name of virtual host and in "Virtual Hosts Names" field enter your domain name like here,lakshmiweblogicadmin.blogspot.com, if you more then one domain name mapped enter each separated by comma

4.
Click on target tab and select managed or admin server wherever you want to target,
5. Deploy your application on virtual host ( select deployment to deploy and target should be virtual host )
6.
Create a channel
Click on managed or admin server on which you you targeted to virtual host, select channels under protocols on right hand side
Click on new
Enter channel name & select protocol http, select next
Enter port 80, select next
Select default options and click next
Select default option and click next
Click on finish

Now, you can see below lines in the server log file on which you targeted the virtual host -

<Oct 18, 2010 10:52:18 PM IST> <Notice> <Server> <BEA-002613> <Channel "Channel-
0" is now listening on 127.0.0.1:80 for protocols http.>

7.
Now instead of http://<server>:<port>/your_apps_url, access it like http://mukeshnegi.com/your_apps_url

For example - 

if you access your apps like http://localhost:7002/shoppingcart/welcome.jsp then access it like    http://lakshmiweblogicadmin.blogspot.com/shoppingcart/welcome.jsp


Comments

Post a Comment

Popular posts from this blog

Interview question for File and FTP Adapter

What is boot.properties file and how to create

SSL Exceptions in Admin Server and Node Manager.