Changing defaultHost is not the solution. John
> -----Original Message----- > From: Hari Venkatesan [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, December 17, 2002 10:51 AM > To: Tomcat Users List > Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone > > > I really don't know if changing the defaulthost name is the > solution. R u able to serve the pages with the configuration > you have now without changing the defaulthost name or are you > getting a DNS error. > > IF you want to serve pages the way you want it, then each of > the <host> entries you have in server.xml should have > <context> defined with its own Web.xml file. > > Hari > > -----Original Message----- > From: J. Norment [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, December 17, 2002 10:36 AM > To: Tomcat Users List > Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone > > Hari: > > Thanks for the response. > ( For that matter, thanks for everyone's response so far... ) > > I want the behavior to be: > > http://localhost - loads up the default welcome page, root/index.jsp > http://host0.com - loads up host0's index page > http://host1.com - loads up host1's index page > > Is changing the default host part of the solution? > > > > On Tue, 17 Dec 2002 10:22:20 -0500, Hari Venkatesan wrote: > >You have two <Host name defined and only one closing tag for the > >host. Did you change "<Engine name="Standalone" > >defaultHost="localhost" debug="99">" to reflect "host0.com" in the > >defaultHost > > > >Hari > > > >-----Original Message----- > >From: J. Norment [mailto:[EMAIL PROTECTED]] > >Sent: Tuesday, December 17, 2002 10:15 AM > >To: Tomcat Users List > >Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone > > > >This is the change that I had made to the server.xml file: > > > >><!-- Define the default virtual host --> > >><Host name="localhost" debug="0" appBase="webapps" > >>unpackWARs="true" autoDeploy="true"> > >> > >><!-- This part is added: --> > >> > >><Host name="host0.com" debug="0" appBase="webapps/host0" > >>unpackWARs="true"> > >><Logger className="org.apache.catalina.logger.FileLogger" > >>directory="logs" prefix="host0." suffix=".log" timestamp="true"/> > >><Context path="" docBase="webapps/host0" debug="0" > >>reloadable="true"/> > >><Context path="/test" docBase="webapps/host0" debug="0" > >>reloadable="true"/> > >></Host> > >> > >><!-- End, added part. --> > > > >Is this is the change that you are referring to in adding the host > >tag? > > > >If that is not working, how would I track down what is broken? > >(ie, are there log files saying exactly what Tomcat is getting from > >the request?) > > > >As for adding an alias for localhost, wouldn't that mean that only > >one host was used? > >Ultimately, I'd like host0.com and host1.com to be different "hosts" > >for Tomcat. > > > >Applying Occam's Razor, I'm pretty sure that something is screwed on > >my end, but not sure how to track it down, at this point... > > > > > >On Tue, 17 Dec 2002 09:27:14 -0500, Turner, John wrote: > >> > >>It has Apache installed, but I just verified this behavior using > >>http://some.server.com:8080 which bypasses Apache. > >> > >>If you need a virtual host setup in Tomcat, modify server.xml and > >>add a Host > >>element with a name parameter set to the FQDN that will be in the > >>URL. > >>Alternatively, if you want some.server.com to be treated as > >>localhost, add > >>an Alias tag to the localhost Host element in server.xml. > >> > >>Apache VirtualHost = Tomcat Host (roughly speaking) > >> > >><Host name="some.server.com"> > >> > >>...some stuff here like Contexts, etc.... > >> > >></Host> > >> > >>The server.xml that comes with Tomcat has what you need already in > >>it. The > >>default server.xml file has a single virtual host (localhost) with a > >>three > >>Contexts (admin, manager, examples). Copy what you need from that. > >>The > >>Host element for localhost has a lot of stuff in it, probably stuff > >>you > >>don't need. Just delete most of it, and you should be fine. > >>Alternatively, > >>find the localhost Host element in server.xml and change the name > >>parameter > >>from "localhost" to "your.server.com", restart Tomcat, and test it > >>out and > >>see if the behavior is what you want, then just copy that. > >> > >>John > >> > >>>-----Original Message----- > >>>From: J. Norment [mailto:[EMAIL PROTECTED]] > >>>Sent: Tuesday, December 17, 2002 9:20 AM > >>>To: Tomcat Users List > >>>Subject: RE: Virtual Domains with Tomcat 4.1.12 Standalone > >>> > >>> > >>>That sounds almost exactly like what I'm trying to do. Does > >>>your test box setup also have Apache installed? If not, what > >>>did you do to get some.server.com showing up? > >>> > >>> > >>>On Tue, 17 Dec 2002 09:14:08 -0500, Turner, John wrote: > >>>> > >>>>Sorry, maybe someone else can answer your question. I'm just not > >>>>understanding the problem. I have a RH 7.3 test box setup, with > >>>>two > >>>>virtual > >>>>hosts (one is localhost, the other is some.server.com), and the > >>>>welcome > >>>>files display correctly. If it isn't working for you, I would > >>>>suggest that > >>>>the issue is with your virtual hosting configuration, not your > >>>>welcome > >>>>file/index.html configuration. > >>>> > >>>>John > >>>> > >> > >>-- > >>To unsubscribe, e-mail: <mailto:tomcat-user- > >>[EMAIL PROTECTED]> > >>For additional commands, e-mail: <mailto:tomcat-user- > >>[EMAIL PROTECTED]> > >> > > > > > > > >-- > >To unsubscribe, e-mail: <mailto:tomcat-user- > >[EMAIL PROTECTED]> > >For additional commands, e-mail: <mailto:tomcat-user- > >[EMAIL PROTECTED]> > > > > > >-- > >To unsubscribe, e-mail: <mailto:tomcat-user- > >[EMAIL PROTECTED]> > >For additional commands, e-mail: <mailto:tomcat-user- > >[EMAIL PROTECTED]> > > > > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>