setting contextpath for ajp requests?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

setting contextpath for ajp requests?

Michael Gratton-3

Hi guys,

I would like to use one instance of Jetty to host a number of webapps
for entire web sites, using Apache 2.2's mod_proxy+mod_proxy_ajp.

For example, if I have two sites, they would each have a separate web
app deployed in the same instance of Jetty but with different context
paths. The mapping from web site to context path might look something
like:

Apache request    Jetty request
www.site1.com/ -> /some-webapp/
www.site2.com/ -> /some-other-app/

The only way I have managed to get this working is to have an instance
of Jetty for each site and app, and for each to have a file
in ./contexts that sets the context path for its app to be '/'.

So, I guess my question is whether it is possible to configure one
instance of Jetty to handle requests for the two apps but make it appear
to each of them that their context paths are '/'?

I see that with 6.1.2 setting the context path is now supported, but I
don't think that is possible using mod_proxy+mod_proxy_ajp.

Cheers,
/Mike

--
Michael Gratton <[hidden email]>    
Quuxo Software <http://web.quuxo.com/>

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support

signature.asc (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: setting contextpath for ajp requests?

jan_bartel
Hi Michael,

I think you might want to check out the info on how to configure
virtual hosts with Jetty:

http://docs.codehaus.org/display/JETTY/Virtual+hosts

cheers
Jan

Michael Gratton wrote:

> Hi guys,
>
> I would like to use one instance of Jetty to host a number of webapps
> for entire web sites, using Apache 2.2's mod_proxy+mod_proxy_ajp.
>
> For example, if I have two sites, they would each have a separate web
> app deployed in the same instance of Jetty but with different context
> paths. The mapping from web site to context path might look something
> like:
>
> Apache request    Jetty request
> www.site1.com/ -> /some-webapp/
> www.site2.com/ -> /some-other-app/
>
> The only way I have managed to get this working is to have an instance
> of Jetty for each site and app, and for each to have a file
> in ./contexts that sets the context path for its app to be '/'.
>
> So, I guess my question is whether it is possible to configure one
> instance of Jetty to handle requests for the two apps but make it appear
> to each of them that their context paths are '/'?
>
> I see that with 6.1.2 setting the context path is now supported, but I
> don't think that is possible using mod_proxy+mod_proxy_ajp.
>
> Cheers,
> /Mike
>
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Jetty-support mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/jetty-support


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support
Reply | Threaded
Open this post in threaded view
|

Re: setting contextpath for ajp requests?

Michael Gratton-3
On Thu, 2007-05-03 at 09:42 +1000, Jan Bartel wrote:
> I think you might want to check out the info on how to configure
> virtual hosts with Jetty:

Ahh, great, that worked like a charm. I never thought to try it because
it didn't seem like it would work using the AJP connector.

I don't suppose you know what the efficiency of having a large number of
virtual hosts is, do you? Is it a linear search for matching webapps for
each request? Speaking of which, I wonder about the same for Apache...

Thanks!
/Mike

--
Michael Gratton <[hidden email]>    
Quuxo Software <http://web.quuxo.com/>

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support

signature.asc (196 bytes) Download Attachment