tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Turner, John" <JTur...@AAS.com>
Subject RE: Apache 2.0.40/Tomcat 4.1.10 vhost problem
Date Thu, 12 Sep 2002 15:34:54 GMT

Just server.xml itself, and the Tomcat docs
(http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/index.html).
Basically, Tomcat is ready, out of the box, to serve on localhost.  So if
you want to add my.host.com, just copy everything done for localhost and
change to my.host.com.

John

> -----Original Message-----
> From: Short, Dave [mailto:dave.short@pfizer.com]
> Sent: Thursday, September 12, 2002 11:15 AM
> To: 'Tomcat Users List'
> Subject: RE: Apache 2.0.40/Tomcat 4.1.10 vhost problem
> 
> 
> Thanks, I'll check this out.  Is there Tomcat documentation 
> that covers this
> stuff?
> 
> -----Original Message-----
> From: Turner, John [mailto:JTurner@AAS.com]
> Sent: September 12, 2002 7:48 AM
> To: 'Tomcat Users List'
> Subject: RE: Apache 2.0.40/Tomcat 4.1.10 vhost problem
> 
> 
> 
> There should be a Host element in server.xml for "localhost".
> 
> It looks like this:
> 
> <Host name="xxx.yyy.com" debug="0" appBase="webapps"
>        unpackWARs="true" autoDeploy="true">
> 
> That's from a 4.1.10 server.xml.  I'm still getting familiar 
> with 4.1.10, I
> think you might need to tweak the Engine element as well.
> 
> So, you would want something like this:
> 
> <Host name="host1" debug="0" appBase="webapps"
>        unpackWARs="true" autoDeploy="true">
> 
> <Host name="host2" debug="0" appBase="webapps"
>        unpackWARs="true" autoDeploy="true">
> 
> <Host name="host3" debug="0" appBase="webapps"
>        unpackWARs="true" autoDeploy="true">
> 
> John
> 
> > -----Original Message-----
> > From: Short, Dave [mailto:dave.short@pfizer.com]
> > Sent: Thursday, September 12, 2002 10:40 AM
> > To: 'Tomcat Users List'
> > Subject: RE: Apache 2.0.40/Tomcat 4.1.10 vhost problem
> > 
> > 
> > The missing link!  I don't have <Host> definitions setup or 
> > see an example
> > of the <Host> definition in the server.xml file.  Would you 
> > mind pointing me
> > in the direction where I can find documentation on this?
> > 
> > Thanks!!!
> > 
> > -----Original Message-----
> > From: Turner, John [mailto:JTurner@AAS.com]
> > Sent: September 12, 2002 7:34 AM
> > To: 'Tomcat Users List'
> > Subject: RE: Apache 2.0.40/Tomcat 4.1.10 vhost problem
> > 
> > 
> > 
> > What are your server.xml Host element definitions?  Do you 
> > have one for each
> > of the Apache virtual hosts?  
> > 
> > John
> > 
> > 
> > > -----Original Message-----
> > > From: Short, Dave [mailto:dave.short@pfizer.com]
> > > Sent: Thursday, September 12, 2002 10:31 AM
> > > To: Tomcat Users List
> > > Subject: Apache 2.0.40/Tomcat 4.1.10 vhost problem
> > > 
> > > 
> > > I'm having a problem accessing .jsp files when running Tomcat 
> > > (inprocess -
> > > mod_jk2) via an Apache virtual host.  I have three virtual 
> > > hosts defined in
> > > the httpd.conf file (see below) with three webapps defined in 
> > > server.xml
> > > (see below).  Apache serves up my index.html just fine from 
> > > vhost App1.
> > > When index.html tries to invoke a .jsp file, Tomcat can't 
> > > find it.  If I add
> > > the absolute path to the .jsp file, within index.html, 
> > > everything works.  It
> > > seems as though Tomcat is trying to serve up the .jsp file 
> > > from the webapps
> > > root.
> > > 
> > > Configuration:
> > > 
> > > Windows 2000
> > > Apache 2.0.40
> > > Tomcat 4.1.10
> > > 
> > > 
> > > index.html:
> > > 
> > > This doesn't work
> > > 
> > > <html>
> > >   <head>
> > >     <title>vhost test</title>
> > >   </head>
> > >   <body>
> > >     <a href="jsp/vhosttest.jsp">vhost test</a>
> > >   </body>
> > > </html>
> > > 
> > > This works
> > > 
> > > <html>
> > >   <head>
> > >     <title>vhost test</title>
> > >   </head>
> > >   <body>
> > >     <a href="/App1/jsp/vhosttest.jsp">vhost test</a>
> > >   </body>
> > > </html>
> > > 
> > > 
> > > httpd.conf:
> > > 
> > > NameVirtualHost *
> > > 
> > > <VirtualHost *>
> > >     DocumentRoot "C:/Tomcat/webapps/App1/htdocs"
> > >     ServerName App1
> > >     ServerAdmin admin@App1.com
> > >     DirectoryIndex index.html
> > >     ErrorLog logs/App1.log
> > > 
> > >     <Directory "C:/Tomcat/webapps/App1/htdocs">
> > >       Options Indexes MultiViews
> > >       AllowOverride None
> > >       Order allow,deny
> > >       Allow from all
> > >     </Directory>
> > > 
> > > </VirtualHost>
> > > 
> > > <VirtualHost *>
> > >     DocumentRoot "C:/Tomcat/webapps/App2/htdocs"
> > >     ServerName App2
> > >     ServerAdmin admin@App2.com
> > >     DirectoryIndex index.html
> > >     ErrorLog logs/App2.log
> > > 
> > >     <Directory "C:/Tomcat/webapps/App2/htdocs">
> > >       Options Indexes MultiViews
> > >       AllowOverride None
> > >       Order allow,deny
> > >       Allow from all
> > >     </Directory>
> > > 
> > > </VirtualHost>
> > > 
> > > <VirtualHost *>
> > >     DocumentRoot "C:/Tomcat/webapps/App3/htdocs"
> > >     ServerName App3
> > >     ServerAdmin admin@App3.com
> > >     DirectoryIndex index.html
> > >     ErrorLog logs/App3.log
> > > 
> > >     <Directory "C:/Tomcat/webapps/App3/htdocs">
> > >       Options Indexes MultiViews
> > >       AllowOverride None
> > >       Order allow,deny
> > >       Allow from all
> > >     </Directory>
> > > 
> > > </VirtualHost>
> > > 
> > > 
> > > workers.properties:
> > > 
> > > [uri:/App1]
> > > info App1 webapp in the default context. 
> > > context=/App1
> > > debug=0
> > > 
> > > [uri:/App1/servlet/*]
> > > info=Prefix mapping
> > > 
> > > [uri:/App1/*.jsp]
> > > info=Extension mapping
> > > 
> > > 
> > > [uri:/App2]
> > > info=App2 webapp in the default context. 
> > > context=/App2
> > > debug=0
> > > 
> > > [uri:/App2/servlet/*]
> > > info=Prefix mapping
> > > 
> > > [uri:/App2/*.jsp]
> > > info=Extension mapping
> > > 
> > > 
> > > [uri:/App3]
> > > info=App3 webapp in the default context. 
> > > context=/App3
> > > debug=0
> > > 
> > > [uri:/App3/servlet/*]
> > > info=Prefix mapping
> > > 
> > > [uri:/App3/*.jsp]
> > > info=Extension mapping
> > > 
> > > [uri:/App3/*]
> > > info=Map the whole webapp
> > > 
> > > 
> > > server.xml:
> > > 
> > >         <!-- Tomcat App1 Context -->
> > >         <Context path="/App1" docBase="App1" debug="0"
> > >                  reloadable="true" crossContext="true">
> > >           <Logger 
> className="org.apache.catalina.logger.FileLogger"
> > >                      prefix="localhost_App1_log." suffix=".txt"
> > >         	  timestamp="true"/>
> > >         </Context>
> > > 
> > >         <!-- Tomcat App2 Context -->
> > >         <Context path="/App2" docBase="App2" debug="0"
> > >                  reloadable="true" crossContext="true">
> > > 
> > >           <Logger 
> className="org.apache.catalina.logger.FileLogger"
> > >                      prefix="localhost_App2_log." suffix=".txt"
> > >         	  timestamp="true"/>
> > > 
> > >         </Context>
> > > 
> > >         <!-- Tomcat App3 Context -->
> > >         <Context path="/App3" docBase="App3" debug="0"
> > >                  reloadable="true" crossContext="true">
> > > 
> > >           <Logger 
> className="org.apache.catalina.logger.FileLogger"
> > >                      prefix="localhost_App3_log." suffix=".txt"
> > >         	  timestamp="true"/>
> > > 
> > >         </Context>
> > > 
> > > --
> > > To unsubscribe, e-mail:   
> > > <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> > > For additional commands, e-mail: 
> > > <mailto:tomcat-user-help@jakarta.apache.org>
> > > 
> > 
> > --
> > To unsubscribe, e-mail:
> > <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> > <mailto:tomcat-user-help@jakarta.apache.org>
> > 
> > --
> > To unsubscribe, e-mail:   
> <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:tomcat-user-help@jakarta.apache.org>
> 
> --
> To unsubscribe, e-mail:
> <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:tomcat-user-help@jakarta.apache.org>
> 
> --
> To unsubscribe, e-mail:   
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:tomcat-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message