tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sampath K Settipalli <Samp...@genome.wi.mit.edu>
Subject Re: setting virtualhost (portbased) apache-mod_jk-tomcat
Date Mon, 24 Sep 2001 17:00:23 GMT
Hi,

  Is there some one who had setup port-based virtual hosts successfully.
 Looks like from my server.xml it doesn't recognise the context-path entry
for that virtual host. This is what I have in my httpd.conf & server.xml
httpd.conf:::
------------
Listen 5181
<VirtualHost xx.xxx.x.xxx:5181>
 ServerName www.wi.sampath.edu
 ServerAdmin sampath@genome.wi.mit.edu
 DocumentRoot /usr/home/squid/sandbox/sampath/squid
 JkMount /servlet/* ajp13
 JkMount /*.jsp ajp13
 # URL aliases for pages that need easy to type in URL's
 Alias /squid/login
"/usr/home/squid/sandbox/sampath/squid/common/html/login1.html"
 Alias /squid/login.html
"/usr/home/squid/sandbox/sampath/squid/common/html/login1.html"
</VirtualHost>

Server.xml::
------------
<Host name="http://xx.xxx.x.xxx:5181" >
           <Context path=""
                    docBase="webapps/ROOT/sqdev-sampath" >
      crossContext="false"
      debug=9
      reloadable="true">
    </Context>
</Host>
---------------------------
xx.xxx.x.xxx:5180 is the same IP address I specified in httpd.conf
virtualhost entry

When I type IP address xx.xxx.x.xxx:5181
It displays me the html page and then passes the request to  tomcat. But
looks like from there it doesn't recognise the context and says
.../path/servlet not found on the server www.wi.sampath.edu port 5180

In the above server.xml Host name entry it is the  IP address and port
rather than virtual host name . However I tried giving the server name I
specified in httpd.conf virtualhost entry (www.wi.sampath.edu) . It still
doesn't work.
I'm using apache 1.3.20 & tomcat 3.2.3.
Can some one please suggest what else can I try.

Thanks,
Sampath



Larry Isaacs wrote:

> Hi Sampath,
>
> I'm not sure if there are issues in Tomcat 3.2.3 and
> virtual hosting.
>
> I do know some work was done in Tomcat 3.3 to better support
> this.  I haven't tried port based virtual hosting but after a
> quick scan your configuration, it looks like it should work.
> I would suggest you give 3.3b2 or the Tomcat 3.3 nightly
> a try if you can.
>
> Cheers,
> Larry
>
> > -----Original Message-----
> > From: Sampath K Settipalli [mailto:Sampath@genome.wi.mit.edu]
> > Sent: Friday, September 21, 2001 12:40 PM
> > To: tomcat-user@jakarta.apache.org
> > Subject: setting virtualhost (portbased) apache-mod_jk-tomcat
> >
> >
> > Hi All,
> >
> >         My requirement is I need to setup different virtual hosts for
> > each user in my development environment. Each user will be having
> > his/her own copy of classes in a different directory/path which each
> > ones context in tomcat points to. I went throught the documents and
> > user-archive mails and tried to setup port -based virtual hosts . For
> > the same IP address of apache use one port per each user. I'm
> > not really
> > sure if port-based VH is a good option or go for IP-based VH .
> > This is what I did.
> >
> > httpd.conf::::::
> > -------------------
> > I added directive
> > Listen 5180
> > Listen 5181 (1 virtual host of a user)
> > Listen 5182 (for 2nd user)
> >
> > Then
> > <VirtualHost XX.XXX.X.XXX:5181>
> >  ServerName www.squid.sampath.edu
> >  DocumentRoot /usr/home/squid/sandbox/sampath/squid
> >  JkMount /servlet/* ajp13
> >  JkMount /*.jsp ajp13
> >  # URL aliases
> >  Alias /squid/login
> > "/usr/home/squid/sandbox/sampath/squid/common/html/login.html"
> >  Alias /squid/login.html
> > "/usr/home/squid/sandbox/sampath/squid/common/html/login.html"
> > </VirtualHost>
> > ----------
> > For 2nd user
> > <VirtualHost XX.XXX.X.XXX:5182>
> >  ServerName www.squid.user2.edu
> >  DocumentRoot /usr/home/squid/sandbox/user2/squid
> >  JkMount /servlet/* ajp13
> >  JkMount /*.jsp ajp13
> >  # URL aliases for pages that need easy to type in URL's
> >  Alias /squid/login
> > "/usr/home/squid/sandbox/user2/squid/common/html/login.html"
> >  Alias /squid/login.html
> > "/usr/home/squid/sandbox/user2/squid/common/html/login.html"
> > </VirtualHost>
> > -------------------------------------
> > IP address XX.XXX.X.XXX is same for all users
> >
> > Changes in server.xml::::
> > --------------
> > <Host name="www.squid.sampath.edu" >
> >            <Context path=""
> >                     docBase="webapps/ROOT/sqdev-sampath" >
> >       crossContext="false"
> >       debug=9
> >       reloadable="true">
> >     </Context>
> >  </Host>
> >
> >  <Host name="www.squid.user2.edu" >
> >            <Context path=""
> >                     docBase="webapps/ROOT/sqdev-tedd" >
> >       crossContext="false"
> >       debug=9
> >       reloadable="true">
> >     </Context>
> >   </Host>
> > -------------------------------
> > No changes to workers.properties. Do I need to do any ?
> >
> > With this when I try apache starts fine and  when I type
> > virtuahost name
> > www.squid.sampath.edu its not recognised. Howver when I type IPaddress
> > XX.XXX.X.XXX:5181/5182 it recognizes the aliases and displays the html
> > page but then looks like it doesn't forward the request to tomcat
> > (executes a servlet) or not recognised from here. It says "The server
> > encountered an internal error or misconfiguration and was unable to
> > complete your request." .
> > It used to work fine without virtual hosts.
> > -----------
> > Now as per my requirement is Port based  virtualHosts a good way to
> > set-up or will IP-based Virtual hosts be a good way.
> > When coming to JVM should all Virtual hosts be under 1 JVM or
> > each under
> > 1 JVM.
> > Can someone please suggest and point me in the right direction.
> > I'm using apache 1.3.20, mod_jk and tomcat 3.2.3 on solaris.
> >
> > Thanks in advance,
> > Sampath
> >


Mime
View raw message