> -----Original Message----- > From: Sean Finkel [mailto:[EMAIL PROTECTED] > Sent: Thursday, August 26, 2004 3:52 PM > To: Tomcat Users List > Subject: Re: Tomcat causes Apache to hang. Any ideas? > > > >>Sorry, this is a shared server, and he wants his site available on port > >>80. > >> > >> > > > >Tomcat standalone can run on port 80 without running as root by using > >jsvc (from commons-daemon). There are examples and more information on > >this configuration at > >http://jakarta.apache.org/tomcat/faq/security.html#jsvcExample. > > > > > > > Maybe I am missing something, but wouldn't that not be able to bind to > port 80 since Apache is already bound to it? There is a lot about the > Java world I am not familiar with, so maybe it can... > You would need separate ip addresses for apache and tomcat.
> >>reason we hand everything off, is because he has his application hosted > >>inside a directory (ie: ~/public_html/appdir) but wants it to be > >>available to users as http://www.domainname.com/whatever.jsp instead of > >>http://www.domainname.com/appdir/whatever.jsp. > >> > >> > > > >You can configure Tomcat to have a Context whose docbase is > >~/public_html/appdir but whose path is "" (the empty string, not null or > >"/"). > > > > > And indeed that is what we are doing for him right now. However, my > previous attempts at fiddling with mod_rewrite to translate root request > /whatever.jsp into /appdir/whatever.jsp had failed. I now have this > working in a preliminary stage. Since I was unable to get mod_rewrite > processing the requests right, we just did a "jkMount /* <workername>", > which passed every request off to tomcat, and since we had the "root" > context setup to serve from ~/public_html/appdir it all worked out fine. > But of course, this results in trying to pass PHP requests (and things > outside the appdir) to tomcat. > how about passing only requests that are not php to tomcat? You can do this in httpd.conf: <LocationMatch "^/(?!phpdir)"> jkUriSet ... </LocationMatch> > > > > > >>He also wants to use PHP > >>on his main domain for forums or some such, once we get him to move his > >>application out of appdir and into his website root. > >> > >> > > > >This is the deal breaker I think, for a commercial organization anyways. > >While you can use PHP on Tomcat, the performance is apparently not good > >enough for a large scale installation. See > >http://wiki.apache.org/jakarta-tomcat/UsingPhp for how to do this > >anyways. > > > > > Well, I don't think I want to run PHP through Tomcat as we already have > Apache running with PHP and it runs solid (and quite snappy too). > > What I am currently working on is this for his .htaccess (well, testing > on a test instance): > --------( snip )-------- > RewriteEngine On > RewriteCond %{REQUEST_URI} !^/appdir/ > RewriteRule ^(.*\.jsp)$ /appdir/$1 > -------( /snip )--------- > > This results in all jsp pages being sent to tomcat. I also added a > jkMount /appdir/* <workername> to the httpd.conf file. This means, that > in the user's JSP pages, if he uses absolute paths for images, css, etc > then they will be handed off to tomcat as well so that a complete page > is sent back. > > The problem currently is, the user used relative paths for all his > images, css files, etc. So while the JSP is being served correctly from > Tomcat with the above .htaccess lines, it is not passing the css and > image files off, which is the expected behavior. So I am trying to find > some way to remedy this via .htaccess so the user doesn't have to change > his 50+ jsp pages =| > > > Thanks again for taking the time to answer my questions and provide your > suggestions. It really is much appreciated! > > -Sean > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED]
