File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Node.js in Action
this week in the
tomcat as a virtual host
Joined: Jun 19, 2008
Sep 11, 2008 23:27:00
I did try and do a search on this forum but am not able to successfully do what I want .
My understanding of a Virtual host :: On same
want to host two applications having their own urls ::
With this understanding I tried to setup a virtual host ::
<Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false"> </Host> [B]<Host name="www.ca.scm.com" appBase="D:\zzz\todel\webapps\"> <Context path="" docBase="ROOT"/> </Host>[/B]
The portion in bold is the one that I wanted to add as a new host
Tried accessing the above using the URL ::
Nothing happened .
So I added following entry in my host ::
#127.0.0.1 localhost 127.0.0.1 <a href="http://www.ca.scm.com" target="_blank" rel="nofollow">www.ca.scm.com</a>
Now above URL works .
However I wastnt very sure if it "really" worked - so I commented out the "host" entry in "server.xml" and then retried the URL
Problem 1 ::
Browser still showed me the index page of ROOT application
So that means my new virtual host is NOT being used but "default host"
How do I ensure that my new Virtual host is used ?
Problem 2 ::
Under the "localhost" which is default I have a application supplied by Tomcat called ROOT
In this exists a
Even if I make any changes to this file Tomcat still shows up the same page
Where is tomcat getting the details from ?
any help is appreciated
I agree. Here's the link:
subject: tomcat as a virtual host
Different webapps on same instance of tomcat on different ports
How to change virtual host from http://localhost/test to http://www.fakedomain.com/?
How to deploy to Root of Tomcat for Website?
Tomcat,Eclipse and form data
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014