I thought I'd post an update to say that I finally cracked this nut.

I ended up spinning up an EC2 Linux instance and installing Apache on it
and using the OpenBD installer to setup OpenBD and prove that it works.
 From there I essentially copied Tomcat to my mac and duplicated the
configuration it worked, with the exception that POST messages were not
being handled correctly somewhere between mod_jk and AJP.  Eventually I
decided to try swapping mod_jk out for mod_proxy and it suddenly started
working!

To make sure I really knew what I was doing I did a new setup from scratch
on my Mac.  This was comprised of the following:

1) Revert back to my initial Apache and Adobe CF setup before I started
messing with OpenBD (I need both installed anyhow)

2) Download Tomcat 7 and extract to /Applications/Tomcat7.

3) Deploy the openbd.war into /Applications/Tomcat7/webapps so that it
expanded into /Applications/Tomcat7/webapps/openbd

4) I edited Tomcat's main web.xml and copied the relevant bits from the
OpenBD web.xml into it.  I used what the OpenBD installer as a template.

5) I added the /Applications/Tomcat7/webapps/openbd/lib directory to the
common classes in the catalina.properties file

6) I added a hello world cfm file under  /Applications/Tomcat7/webapps/root
and confirmed that I was able to see it working correctly and I could, even
though it wasn't under the openbd context.

7) I downloaded the mod_cfml valve jar into the /Applications/Tomcat7/lib
folder and added it's config into the server.xml config file for Tomcat

8) I added this entry into my Apache config:

<VirtualHost *:80>
# configure the hostname I'm listening to
ServerName local.openbd.ts.blargh.com
# where my files are located for this vhost. note that this is not under
Tomcat anywhere
DocumentRoot "/Users/doug/Projects (Case Insensitive)/blargh/webapps"

# This removes Adobe CF's listeners for this vhost only
RemoveHandler jakarta-servlet .cfm .cfml .cfc .cfr .cfswf

# This makes sure that the proxied application doesn't change urls to have
the port 8080 in links, etc
ProxyPreserveHost On
# Configure mod_proxy to send requests for all files to Tomcat using the
same hostname and the tomcat http port 8080
ProxyPass / http://local.openbd.ts.figleaf.com:8080/
 ProxyPassReverse / http://local.openbd.ts.figleaf.com:8080/

# Configure mod_cfml to dynamically create the appropriate context for this
host in Tomcat
 PerlRequire /Applications/Tomcat7/mod_cfml_connector/mod_cfml.pm
PerlHeaderParserHandler mod_cfml
 PerlSetVar LogHeaders true
PerlSetVar LogHandlers true
PerlSetVar CFMLHandlers ".cfm .cfc .cfml"
</VirtualHost>

# Just including this here to show that the same app from the same
directory can be configured to run at the same time off two different CFML
engines
<VirtualHost *:80>
ServerName local.cfusion.ts.blargh.com
DocumentRoot "/Users/doug/Projects (Case Insensitive)/blargh/webapps"
</VirtualHost>

At this point I was able to reload tomcat and Apache and things worked
correctly!  (I don't think I've missed any major steps here either!)

Now to replicate this process in Windows and see if I can finally move
beyond this.

Thanks everyone for your help with this,



Doug Hughes
[email protected]
651-252-4234


On Thu, Aug 8, 2013 at 4:43 AM, Ivo Verbeek <[email protected]> wrote:

> Why can't you run multiple applications in the same openbd instance?
> Create seperate subfolders in the one openbd webroot, give them each an
> unique application name and done. I wouldn't recommend it though for
> "hundreds" of apps. My advice: only put multiple apps in one openbd
> instance if security is not an issue and there are no dependencies between
> the apps. Otherwise, go for one app = one openbd instance, like others are
> suggesting. In fact, I would recommend you to take that one step further
> and isolate the big applications in terms of resources, into seperate
> JVM's, with their own memory space. You can do that by having multiple
> Tomcat/Jetty instances on the same server. Our production servers are
> actually a mix.
>
> However, I think what you are really struggling with is how to route
> traffic from http://host1.example.com to
> http://127.0.0.1:8080/openbd/webroot/app1/. There are different solutions
> for that, I prefer to use proxy in front. So Apache HTTP on Linux (or
> Nginx) or IIS+ARR on Windows. Use the webserver to setup virtual hosts and
> route traffic to the correct instance/openbd/subdirectory in the
> application server.
>
> Unfortunately there is no "installer" that is going to help you with that,
> it is not an easy route, but the most flexible setup in my opinion if you
> want to host many applications on the same server. And possible on both
> Linux and Windows.
>
> Ivo
>
>
> --
> --
> online documentation: http://openbd.org/manual/
> http://groups.google.com/group/openbd?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Open BlueDragon" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
online documentation: http://openbd.org/manual/
 http://groups.google.com/group/openbd?hl=en

--- 
You received this message because you are subscribed to the Google Groups "Open 
BlueDragon" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to