On Tue, Feb 08, 2011 at 03:08:12PM -0800, Glenn Little wrote:
> So it seems that running an ajp port in tomcat, and connecting from
> apache with mod_jk or  some such is not strictly necessary?   As in, I
> could conceivably:
> 
> * run tomcat standard (non ajp) on 8080 and firewall 8080 from the
> outside world for safety
> 
> * in apache, first forward/redirect all port 80 requests (non-https)
> over to port 443 (https)
> 
> * in the apache 443 vhost, proxy requests over to 8080
> 
> How much of the extra complication beyond the above is actually
> necessary?  It looks to me like ajp might be nice for communication
> efficiency, but not strictly necessary.

Why do you see AJP as a problem?  You have to set up the proxy link
anyway, regardless of which protocol you use, and there is more
documentation and experience for doing this between HTTPD and Tomcat
using AJP.  On the HTTPD side the only difference is which URL scheme
you use in the ProxyPass and ProxyPassReverse statements.  On the
Tomcat side the only difference is whether you write an HTTP Connector
element or an AJP Connector element.  The big difference is in how
many people can help you if you have problems, and AJP wins that one.

> So my other question at this point is the Contexts.  I'm wondering if
> it's possible (and if so, is there a reason why not to it) to use
> rewriting over in apache land *instead* of setting up separate
> contexts?  For instance, craft rewrite rules such that:
> 
> * /jspui -> 8080:/jspui
> * /sword -> 8080:/sword
> * etc etc (with all the special cases)
> * /* -> 8080:/xmlui/*     (catch everything else and transparently use
> xmlui for it)

Actually this is too complicated.  If you have no other use for HTTPD
then just proxy all of the local path space over in one go:

 /* -> 8080:/

Pick the app. that you want to appear at the root of the local path.
Copy it to webapps/ROOT instead of webapps/nameofapp, and it will
so appear.

Don't think you got rid of Contexts, though.  Tomcat will build a
Context object for each webapp it finds in the Host's appBase.  If you
don't want the additional control that an explicit Context element
gives you, don't write one at all and just copy each app into Tomcat's
webapps directory.

A Context *object* (in-memory structure) for each webapp is required
by the Servlet specification, but a Context *element* (configuration
data) is not needed by Tomcat if you trust Tomcat's default actions.
See Automatic Application Deployment in the Host page of Tomcat's
configuration reference.  The Context object is a holder for
references to application Parameters and Resources, the application's
classloader, and a bunch of other stuff without (some of) which your
app. won't work.

-- 
Mark H. Wood, Lead System Programmer   [email protected]
Asking whether markets are efficient is like asking whether people are smart.

Attachment: pgpMAIgOLq732.pgp
Description: PGP signature

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to