You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Dan Allen <da...@mojavelinux.com> on 2003/04/30 03:56:19 UTC
[OT] url mapping apache to java container
This is a bit off topic, but still of concern to most struts
developers. If I were to create a virtual host on an apache
webserver, how could I get the root to forward to a particular web
application under the java container, such as tomcat.
In short, I want a request like
www.mysite.com -> a web app named /example
I guess I would use mod_rewrite, which would interpret any request to
www.mysite.com
as
www.mysite.com/example/
at which point mod_jk2 would pick it up and throw it to the tomcat
server. Does that sound about right?
Dan
--
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Daniel Allen, <da...@mojavelinux.com>
http://www.mojavelinux.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[Frodo]: "I wish it need not have happened in my time."
[Gandalf]: "So do I, and so do all who live to see such times.
But that is not for them to decide. All we have to decide is
what we do with the time that is given to us.'
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: [OT] url mapping apache to java container
Posted by James Mitchell <jm...@apache.org>.
You must have said something REALLY REALLY bad, cause your message never
made it dude.
I'm guessing it was quarantined.
--
James Mitchell
Software Developer/Struts Evangelist
http://www.open-tools.org
----- Original Message -----
From: "John M Flinchbaugh" <gl...@butterfly.hjsoft.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Wednesday, April 30, 2003 2:26 PM
Subject: Re: [OT] url mapping apache to java container
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: [OT] url mapping apache to java container
Posted by John M Flinchbaugh <gl...@butterfly.hjsoft.com>.
On Tue, Apr 29, 2003 at 08:56:19PM -0500, Dan Allen wrote:
> In short, I want a request like
> www.mysite.com -> a web app named /example
> I guess I would use mod_rewrite, which would interpret any request to
> www.mysite.com
> as
> www.mysite.com/example/
> at which point mod_jk2 would pick it up and throw it to the tomcat
> server. Does that sound about right?
i used to try to get that mod_jk stuff to work, but it just didn't
seem straight-forward enough. i opted instead to just go with a
reverse proxy in apache which requests everything from my jboss/jetty
server.
that leaves all the static stuff being served out by jetty, but i
figure the apache can cache static content and it'll be about like the
the static content was coming right from apache. using the apache
proxy also allowed me to implement ssl and mod_gzip, etc right in
apache, and not have to mess with it in jetty.
here's an example config:
<VirtualHost butterfly.hjsoft.com>
ServerName wedding.hjsoft.com
ServerAlias wedding
Redirect / http://wedding.hjsoft.com/wedding/index.jsp
ProxyRequests on
ProxyPass /wedding/ http://localhost:8080/wedding/
ProxyPassReverse /wedding/ http://localhost:8080/wedding/
DefaultType text/html
<Directory proxy:*>
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
a request comes to http://wedding.hjsoft.com/, it gets redirected up
to http://wedding.hjsoft.com/wedding/index.jsp. at that point, apache
turns around and requests it right from jboss/jetty.
this seemed simple enough, and it allows me to keep developing in
jboss alone, and deploy onto a production jboss behind apache. i
don't have to seperate my content.
--
____________________}John Flinchbaugh{______________________
| glynis@hjsoft.com http://www.hjsoft.com/~glynis/ |
~~Powered by Linux: Reboots are for hardware upgrades only~~