tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Jung <rainer.j...@kippdata.de>
Subject Re: Apache + Tomcat + mod_jk + VirtualHost
Date Tue, 01 Apr 2008 17:42:00 GMT
Hi Tony,

Tony Stocker schrieb:
> Hello All,
> 
> I have a working configuration but cannot find a way to extend it in
> the way that we need to do.
> 
> Currently we load ../conf/auto/mod_jk.conf into Apache's httpd.conf.
> The mod_jk.conf file is automatically generated and creates the
> <VirtualHost> entry just fine.
> 
> HOWEVER, we need to ADD Apache config elements to this <VirtualHost>
> block and I cannot find a way to do this.  For instance we need to
> pass in a separate SSLCertificate directive to this VirtualHost as
> well as establishing a rewrite rule.

the automatic generation of httpd config snippets via Tomcat is only 
meant as a simple way to get a starter config. It's not supposed to be 
simply included into your httpd config without further optimization (at 
least for serious production). It's a fast way to get a simple and 
hopefully working configuration.

> If this was a static conf file this would not be an issue.  However
> there appears to be no documentation for how one can include such
> additional configuration information so that it can be "sucked into"
> the mod_jk.conf file automatically.  If we stop using the automated
> mod_jk file then we need to manually update this whenever the
> developers change the application (with the associated JKmount
> commands that are automatically generated) and we want to avoid that.

You should copy the auto generated file to your httpd server. In larger 
deployments, the Tomcat and httpd servers will typically not be the same 
machines anyhow. Yes, then you loose the auto-update (new webapp, new 
JkMount). So then you'll need to manage your URL maps (JkMount) 
separately and not automated by deployment.

If you want to hace that a little more dynamic, you can separate your 
JkMount into a separate JkMountFile (usually called 
uriworkermap.properties), which has the nice feature of getting 
monitored for change, so that new entries get active automatically, 
without restarting your httpd. Nevertheless you have to add the new 
entries yourself.

> So IS there a way to "suck in" these additional configuration
> directives so that they are included automatically in the mod_jk.conf
> file?

Maybe, but not that I'm aware of. Never actually used the auto config 
feature. But ask yourself, if it is really something to deserve to 
automatically have new JkMounts added whenever you deploy a new app, and 
deleted when you undeploy. What happens once you start using a second 
Tomcat, which one should produce the auto config you use on the web 
server etc. Things usually do not happen atomically in larger layouts, 
so you need to carefully think about the right point in time, when you 
actzally add the mappings to your httpd config.

> Thanks!
> 
> Tony

Only my 0.02 cents.

Rainer

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message