Stephen F Roberts
Stephen F Roberts

Reputation: 280

ColdFusion 2016 / Coldbox 4.3 - Running multiple applications on a single server

We are using ColdBox 4.3 and are deploying multiple ColdBox applications.

Each application is developed separately with its own Coldbox.cfc config file and its own handlers, models, and views. While they do share some common features, they can not (currently) be run as a single big application run out of the root level of the website.

Our webroot directory looks something like this:

/
/coldbox
/app_1
|      Application.cfc
|      /coldbox
|      /config
|      |       /Coldbox.cfc
|      /handlers
|      /models
|      {etc}
|
/app_2
|      Application.cfc
|      /coldbox
|      /config
|      |       /Coldbox.cfc
|      /handlers
|      /models
|      {etc}
|
/app_3
|      Application.cfc
   {etc}

We have a copy of /coldbox at the root level and a duplicate copy of /coldbox inside each application folder.

If I delete either the root level /coldbox -or- the copy of coldbox inside each application, the application will crash.

How do other developers handle the case of multiple Coldbox applications running on the same webserver???

Upvotes: 1

Views: 388

Answers (1)

Brad Wood
Brad Wood

Reputation: 3953

You need to create a CF mapping that maps /coldbox for each app to wherever ColdBox lives. If all your apps use the same version of ColdBox, then I'd just point them all at the same place. And it doesn't even need to be in the web root. As long as /coldbox resolves to the framework, you'll be fine.

And no another note, if you're on Adobe ColdFusion and hosting more than one app on the same server, you'll want to turn off "Component Cache" in the CF administrator. It will really mess you up.

Upvotes: 4

Related Questions