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

Explain the performance tuning in jvm, jdbc, jms?

882


How do I use os authentication with weblogic jdriver for oracle and connection pools? : BEA Weblogic

938


How you are getting the alerts?

968


How does a file store compare with a jdbc store? : BEA Weblogic

904


How do I handle request/response using jms? : BEA Weblogic

995


Can two jms servers share the same persistent store? : BEA Weblogic

835


Why is my jms work not part of a user transaction (i.e., Called within a transaction but not rolled back appropriately)? How do I track down transaction problems? : BEA Weblogic

857


What happens if remove( ) is never invoked on a session bean?

883


How does a server find out server unavailability?

895


What is meany by proxy server?

1161


How are the notifications generated when a server is added to a cluster?

991


A client wants to preserve the reference to the ejbhome object of an enterprise bean instance and use it later. Which of the following can be serialized for this purpose? : BEA Weblogic

951


Explain what an application server does and it's major components.

894


What causes java.io exceptions in the log file? : BEA Weblogic

959


What are managed servers?

977