What are the contents of mod_jk.conf?

Did you restart Apache so that it could pick up the changes?

Is there a VirtualHost container in mod_jk.conf for www.host2.com?

In your Host container in server.xml, you list the name as "host2.com", not
"www.host2.com".   Is this a typo?  The two are different.  Either change it
to "www.host2.com" or use <Alias> within the Host container to alias
www.host2.com to host2.com.

John

> -----Original Message-----
> From: Hostmaster of the day [mailto:[EMAIL PROTECTED]
> Sent: Friday, February 28, 2003 11:36 AM
> To: [EMAIL PROTECTED]
> Subject: RE: how to get apache-tomcat virtual host work?
> 
> 
> John,
> 
> where is your reply ?
> 
> how to get apache-tomcat virtual host work? is an easy
> question as long as you are using Tomcat 3.2.3 or Tomcat 3.3.1.
> 
> Although I'm working very successfully with virtual hosts 
> and Tomcat 3.2.3 + 3.3.1 I was up to now unable to get virtual 
> hosts running with Tomcat 4.
> 
> Only the default virtual host is running. It doesn't matter
> which virtual host I'm using.
> 
> I'm not alone and still working on it.
> 
> --Dave
> 
>  
> 
> Is this a glitch?  Did my first reply to this post get lost?
> 
> John
> 
> 
> > I have redhat linux 7.3 
> >  
> >  i have two virtual host in my machine www.host1.com and
> www.host2.com
> >  www.host1.com is the default one.
> >  I have installed apache-tomcat on my machine
> >  apache-tomcat runs fine with the www.host1.com  one.
> >  i mean both http://www.host1.com:8080/examples and 
> >             http://www.host1.com/examples  come to same 
> > result which is
> >  good.
> >  i want www.host2.com work same way as www.host1.com in term 
> > of running
> >  apache-tomcat i did following to server.xml
> >   
> >  
> >  I add <host> dirctive like this
> >  
> > **************************************************************
> > *************
> >   <Host name="host2.com" debug="0" appBase="/home/www/zhujp98"
> >            unpackWARs="true">
> > 
> >            <Listener
> >               className="org.apache.ajp.tomcat4.config.ApacheConfig"
> >                         append="true"  />
> > 
> >         <!-- Normally, users must authenticate themselves to 
> > each web app
> >              individually.  Uncomment the following entry if you
> would
> >           like
> >              a user to be authenticated the first time they 
> > encounter a
> >              resource protected by a security constraint, and 
> > then have
> >                that
> >              user identity maintained across *all* web applications
> >              contained
> >              in this virtual host. -->
> >         <!--
> >         <Valve 
> > className="org.apache.catalina.authenticator.SingleSignOn"
> >                    debug="0"/>
> >         -->
> > 
> >         <!-- Access log processes all requests for this 
> > virtual host.  By
> >              default, log files are created in the "logs" directory
> >              relative to
> >              $CATALINA_HOME.  If you wish, you can specify a
> different
> >              directory with the "directory" attribute.  
> > Specify either a
> >              relative
> >              (to $CATALINA_HOME) or absolute path to the desired
> >               directory.
> >         -->
> >         <Valve className="org.apache.catalina.valves.AccessLogValve"
> >                  directory="logs"  prefix="localhost_access_log."
> >                  suffix=".txt"
> >                  pattern="common"/>
> > 
> >         <!-- Logger shared by all Contexts related to this 
> > virtual host.
> >             By
> >              default (when using FileLogger), log files are 
> > created in the
> >               "logs"
> >              directory relative to $CATALINA_HOME.  If you 
> > wish, you can
> >               specify
> >              a different directory with the "directory" attribute.
> >              Specify either a
> >              relative (to $CATALINA_HOME) or absolute path to 
> > the desired
> >              directory.-->
> >         <Logger className="org.apache.catalina.logger.FileLogger"
> >                  directory="logs"  prefix="localhost_log." 
> > suffix=".txt"
> >                 timestamp="true"/>
> > 
> >         <!-- Define properties for each web application.  This is
> only
> >            needed
> >              if you want to set non-default properties, or have web
> >              application
> >              document roots in places other than the virtual host's
> >              appBase
> >              directory.  -->
> > 
> >         <!-- Tomcat Root Context -->
> >         <!--
> >           <Context path="" docBase="ROOT" debug="0"/>
> >         -->
> > 
> >          <Context path="/servlets" 
> > docBase="/home/www/zhujp98/servlets"
> >          debug="0"
> >                 reloadable="true"/>
> >  </Host>
> > 
> > **************************************************************
> > ****************
> > 
> > after that I can access servlets using 
> http://www.host2.com:8080/servlets
> 
> but fails when i use http://www.host2.com/servlets
> 
> it seems that apache did not connect to tomcat in terms of
> www.host2.com
> 
> how can i fix this problem?
> Thanks
> 
> j.p 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to