On Tuesday, Jun 24, 2003, at 11:10 US/Pacific, Barney Boisvert wrote:
> Say you've got Tomcat w/ CFMX running, along with an Apache 2 install,
> and
> you want to connect Tomcat to Apache to share the job of serving
> content.
> How would you go about doing it?
You have several options.
> The ideal setup would allow CF pages to
> reside outside /cfusion, and the Apache/Tomcat connector would be
> mod_jk2.
CF pages can reside anywhere - you can change the document root in one
of the XML files. I haven't done it for Tomcat but I have done it for
JRun (although I use the JRun Management Console to set the document
root to avoid editing XML files!).
Then I use mod_proxy and mod_rewrite rather than the connector module.
I do this because I have multiple sites running through the same Apache
instance. My rewrite rule looks like this:
RewriteRule ^/cfusion(.*)$ http://127.0.0.1:8180/cfusion$1 [P,L]
That rewrites and proxies all URLs beginning with /cfusion to the
Tomcat instance. You could easily do this:
RewriteRule ^/(.*\.cf[cm])$ http://127.0.0.1:8180/$1 [P,L]
That would map all .cfm / .cfc requests to Tomcat. You'd want
additional rewrites for .jsp and a special one for the Flash Remoting
gateway.
For the development environment I have set up, this is just more
flexible for me.
Sean A Corfield -- http://www.corfield.org/blog/
"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community.
http://www.fusionauthority.com/ads.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4