tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: virtual host for apache/tomcat server
Date Wed, 30 Mar 2011 18:53:00 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

James,

On 3/30/2011 2:36 PM, James Pifer wrote:
> I have the following installed on CentOS 5.5
> httpd-2.2.3-43.el5.centos.3
> tomcat5-5.5.23

Any opportunity to upgrade? Tomcat 5.5.23, while current and still
supported, is basically in maintenance-mode. TC 7 is where the real
action is these days :)

> I have a small jsp app that I CAN hit through apache like:
> http://www.mydomain.com/tomcat/myapp.jsp
> 
> So tomcat in the url above is the apache proxy address for the tomcat
> server. 

Okay. What proxy are you using mod_proxy_ajp? mod_proxy_http? mod_jk?
What are your ProxyPass settings (or JkMounts)?

> I want to setup a virtual host in apache to automatically load this app
> if I type:
> http://myapp.mydomain.com

Sounds reasonable. Obviously, you'll have to register that hostname in
DNS somewhere. Once you've done that...

> Looking at many howtos and FAQ's I'm still having trouble figuring this
> out. 
> 
> My jsp is located at:
> /usr/share/tomcat5/webapps/ROOT/myapp.jsp

Oh, good: you're using the ROOT webapp. So many people want to use
"mystupidname" instead of ROOT and just give themselves headaches when
what they really want is ROOT.

> I have myapp.jsp added to the httpd/apache DirectoryIndex. 

That's not going to work the way you want it to work. Instead, you want
to do a ProxyPass that maps path-less requests to Tomcata, and then set
myapp.jsp as a "welcome file" in your webapp's WEB-INF/web.xml file.

> I have a DNS entry configured and working for http://myapp.mydomain.com

Good.

> What apache and tomcat config files do I need to modify, and how, to
> make http://myapp.mydomain.com load my app automatically?

Post your relevant httpd configuration, first: we'll start with what
you've got.

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

iEYEARECAAYFAk2TfAwACgkQ9CaO5/Lv0PDj9ACgmL9e/g4kDLl5+uS3C57UxETX
VaEAn1epTtVa+d6dfOwB1OKaec8wh8xI
=Mxzx
-----END PGP SIGNATURE-----

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


Mime
View raw message