-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Rathna,

On 6/1/2010 2:35 PM, Rathna wrote:
> Let's say I own two websites.
> 1) batman.com
> 2) superman.com
> 
> I have two web applications hosted in tomcat6 under webapps.
> 1) /usr/local/tomcat6/webapps/
> batman
> 2) /usr/local/tomcat6/webapps/superman
> 
> I would like to configure apache in such a way that when I type the url
> http://www.batman.com the website under /batman should be served. Likewise
> if I type the url http://www.superman.com the website under /superman should
> be served.
> 
> Right now, I can only get it working if I type http://www.batman.com/batmanor
> http://www.superman.com/superman.

$ mkdir /usr/local/tomcat6/webapps-batman
$ mv /usr/local/tomcat6/webapps/batman \
     /usr/local/tomcat6/webapps-batman/ROOT

$ mkdir /usr/local/tomcat6/webapps-superman
$ mv /usr/local/tomcat6/webapps/superman \
     /usr/local/tomcat6/webapps-superman/ROOT

Now, go edit your server.xml and create two new <Host>s:

<Host name="www.batman.com" appBase="webapps-batman" ...>

<Host name="www.superman.com" appBase="webapps-superman" ...>

>     JkMount / worker1
>     JkMount /* worker1

Note that the second JKMount includes the first.

>     JkMount /* worker1

Note that you don't need to use Apache httpd at all if this is your
configuration.

> I'm running this on Ubuntu 9.0.4 OS. I'm really stuck. Any help would be
> much appreciated. Thank you.

If you're using the Ubuntu-managed package of Tomcat, you may have to
fight with your configuration files to get this to work. It looks like
you've installed it directly from tomcat.apache.org, since it's
installed in /usr/local, so you should be good to go.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkwFgu0ACgkQ9CaO5/Lv0PAj7gCgjTnYjYwNNCx9NsywDFS203Cl
oXUAnRRhHoo3sO/33OTdO+WiKGvlPkw4
=LCCs
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to