nohacks wrote:
> Hi Chris,
> 
> Thanks for your very detailed response!! 
> 
> I will try that out Tues Morning and get back to you with any questions. 
> 
> I do have one. 
> 
> Currently I have my app deployed as ROOT in Tomcat. How do I change this for
> multiple apps? I am new to Apache and Tomcat deployments...
> 
> For example I would like to have 
> 
> www.example.com load that is why I deployed as ROOT.war. 
> www.additional.com
> www.extra.com
> 
> I Read several articles about starting off Tomcat war files with
> www.example.com and not extra path stuff.

Plenty of info on the docs site, and usually a better source than
'articles' of unknown provenance:

 http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html

p


> Thanks
> Phil
> 
> 
> 
> 
> Christopher Schultz-2 wrote:
> Phil,
> 
> On 4/26/2009 2:47 AM, nohacks wrote:
>>>> How you host multiple websites with Apache2 and Tomcat Cluster ??
> When you say "multiple websites" do you mean "multiple webapps"? Serving
> multiple web applications should not be a problem at all:
> 
>>>>         JkMount /*.jsp loadbalancer
>>>>         JkMount /*.jsf loadbalancer
> This appears to be a set up for a single webapp, but can certainly be
> used to power several sites:
> 
> /app1/index.jsp
> /app2/index.jsp
> /app3/index.jsp
> 
> All of these will be sent to Tomcat using the "loadbalancer" worker.
> Tomcat will determine which webapp should receive each request.
> 
>>>>         JkMount /servlet/* loadbalancer
> Use of the "/servlet" request dispatcher is not recommended. If you have
> servlets using this, you might want to consider migrating to a setup
> where each servlet is explicitly defined in your web.xml to make a
> unique URL. You may already be doing this but have retained the /servlet
> prefix for historical reasons. I figured I'm mention it, though.
> 
>>>>         JkMount /* loadbalancer
> Technically speaking, this JkMount covers all 3 previous JkMount
> statements, so the others are not necessary. But, since you are using
> httpd in the first place, why not have it serve your static content for
> you? If I were you, I'd remove this JkMount and direct httpd to serve
> static files for you, while delegating to Tomcat for things like JSPs
> and servlets.
> 
> Also, I like to specifically mount each web application separately. I
> happen to use different workers for each webapp (I have separate
> back-end Tomcats for each one) so I /must/ do this, but it helps
> document the httpd configuration file, too:
> 
> JkMount /app1/*.jsp loadbalancer
> JkMount /app1/*.jsf loadbalancer
> 
> JkMount /app2/*.jsp loadbalancer
> JkMount /app2/*.jsf loadbalancer
> 
> JkMount /app3/*.jsp loadbalancer
> JkMount /app3/*.jsf loadbalancer
> 
>>>> It would be nice to have separate log files ??
> You can use separate log files within the same VirtualHost section by
> using environment variables:
> 
> SetEnvIf Request_URI "^/app1/" app1
> CustomLog logs/app1.log env=app1
> 
> See
> http://httpd.apache.org/docs/2.2/mod/mod_log_config.html#customlog
> 
>>>> I am using AJP and wondering how this would work. Also, with sticky
>>>> sessions
>>>> and separate websites ??
> The use of sticky sessions should have no impact on multiple webapps.
> 
> -chris
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org
>>
>>
>>


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

Reply via email to