Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is Virtual Host in Weblogic , how to create it & what
is the advantage ?

Answer Posted / athar mohammad aarif

Virtual Host is a configured 'Host Name' that routes
requests from a particular 'DNS Name' to a particular
Weblogic Server Instance or a Cluster.
Steps to create a Virtual Host :-
The first file we'll need to edit is the Apache httpd.conf
file. For example, mine is here:
C:\Program Files\Apache Group\Apache\conf\httpd.conf
o to the very bottom of your httpd.conf file in your text
editor. You should see an example of a virtual host there.
Each line of that example will begin with an octothorpe (#).
The octothorpe character marks the line as a comment, so the
example is not executed. Add the following lines below that
example:

NameVirtualHost 127.0.0.1

<VirtualHost 127.0.0.1>
DocumentRoot "C:\My Sites\Site1"
ServerName site1.local
</VirtualHost>

<VirtualHost 127.0.0.1>
DocumentRoot "C:\My Sites\Site2"
ServerName site2.local
</VirtualHost>

That's all you need to do! Save and close the file. That
will tell the Apache server everything it needs to know in
order for it to serve the pages using the domain names
site1.local and site2.local. One note is that, in the above
example, we have a space in the path. Because of that, we
put quotation marks around the document root directory. If
the path does not have any spaces in it, do not quote the
path. If the directory used for your sites were, for example
MySites instead of My Sites, the document root line would
look like this instead:
DocumentRoot C:\MySites\Site1
Provide the information about the configured Virtual Host in
Apache in the Weblogic Server Console at 'Virtual Hosts -->
Create New' tab.

Resolving the DNS issue

Obviously, if you typed http://site1.local in your browser,
it would not be found by your Internet provider's DNS
server. We're next going to edit another file to work around
that. The second file you need to edit is called hosts, with
no file extension. It is a Windows system file and it will
enable you to enter specific addresses for specific domains
instead of using a DNS lookup. The normal location for this
file is:

C:\WINNT\system32\drivers\etc\hosts

or

C:\Windows\system32\drivers\etc\hosts

If you don't find it there, do a search in your windows
directory for the word hosts in the file name. The file you
want is called hosts, with no file extension. The correct
file will begin with the following lines:

# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for
Windows.


Once again, in this file, the octothorpe character is a
comment marker. Lines beginning with it are comments. In all
likelihood, there will be nothing there, except for
comments. If there are any other non-commented entries,
leave them alone. Just go to the bottom of the file, below
all the comments and any existing entries and add the
following two lines:

127.0.0.1 site1.local
127.0.0.1 site2.local

That's all you need to do there. Save and close the hosts file.

You're almost done! The only remaining thing you need to do
is to re-start the Apache server. You need to do this
because Apache only reads the configuration file when it
first starts up. Click Start->Programs->Apache HTTP
Server->Control Apache Server->Restart. If you don't have
that menu item, open a command prompt and change to the
Apache directory, and type the following command and press
the Enter key:

apache -w -n "Apache" -k restart

You should see a message like this:

The Apache service is restarting.
The Apache service has restarted.

That's it! You're done! Close the command window and start
your web browser. In the browser's address bar, type
http://site1.local and hit the Enter key. You should now see
your local copy of your site1.

Okay, now I'll mention one very small, but possibly
important, caveat. When you create the virtual hosts like
this, the default http://localhost will no longer work. In
many cases, that is unimportant. However, if you're using
something like phpMyAdmin, you'll still need it. The
solution to that is to create one additional virtual host
called "localhost" that points to the original Apache htdocs
folder. It might look something like this:

<VirtualHost 127.0.0.1>
DocumentRoot C:\Apache\htdocs
ServerName localhost
</VirtualHost>


Don't forget to include that additional virtual host when
you edit the Windows hosts file.

Note that there are other optional settings you can use to
configure the virtual host. The above uses only two lines
and that's all that's really necessary. You can read about
other options in the Apache documentation. Note that this
link is to the Apache web site and it will open a new
browser window.

I hope you found this more helpful than confusing. Good luck!

Is This Answer Correct ?    6 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Do you know what are the steps in which unicode codesets can be set with the weblogic jdriver?

927


Which of the recommended practices to be performed in the ejbpassivate() method of a stateful session bean? : BEA Weblogic

1040


What causes an ociw32.dll error? : BEA Weblogic

1156


What command will you use to recursively search for a particular string across multiple files in your currentdirectory?

976


Explain The Methods For Providing User Credentials For Starting The Server ?

1031


Why did the messaging bridge fail to connect to the source bridge destination? : BEA Weblogic

951


What is the emergency log message?

1013


How to configure jms?

1091


Write a program to call the store procedure of oracle that takes no parameter?

973


What are the functions of t3 in the web logic server?

979


Managed servers are running. What happens if admin server down?

920


What is the difference between creating a distributed application using rmi and using a ejb architecture?

908


How should I use sorted queues? : BEA Weblogic

1054


What are the ways in which weblogic servers can run on multiple machines?

1033


How to write a program of web logic server to get the connection pool attribute?

949