House of Fusion
Home of the ColdFusion Community

Search cf-talk

October 11, 2008

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
       1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31   

Subscribe Now
Fusion Authority Quarterly Update - ColdFusion 8 Special Edition
Search over 2,500 ColdFusion resources here  >>>      
Home /  Groups /  ColdFusion Talk (CF-Talk)

Multiple ColdFusion applications under a single instance/webroot?

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
Jason,
Nathan Strutz
07/03/08 03:07 P
Hi Nathan
Jason Ho
07/03/08 03:33 P
Jason,
Nathan Strutz
07/03/08 07:25 P
Thanks Nathan..
Jason Ho
07/03/08 07:47 P
Oh please, not again ;o)
Wim Lemmens
07/03/08 04:09 P
Wim
Jason Ho
07/03/08 04:13 P
Hi Wim
Jason Ho
07/03/08 06:15 P
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Jason Ho
07/03/2008 02:04 PM

Hi all, this has been troubling me for a day or 2 now. I'm sure it must be possible somehow?... I'm trying to setup multiple sites under a single CF 8 instance (we currently run cf in distributed mode and multiple instances, however this is more just for demo purposes for various client sites when we don't want to fully establish a new single instance just for an individual demo site). The idea is something like this: www.mycompany.com/clientsite1 www.mycompany.com/clientsite2 www.mycompany.com/clientsite3 www.mycompany.com/clientsite4 etc... This was possible when we were using application.cfm (ie just cfincluding the parent folder's application.cfm). However, now that we're moving to application.cfc the problem is that using the applicationproxy method to inherit the root application.cfc means that we can't inherit the main application.cfc (as the CF webroot is set for www.mycompany.com/) for each clientsite. The inability to dynamically extend a cfc also doesn't help :(. Does anyone have a solution/workaround for this? any help is much appreciated! Thanks Jason

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Nathan Strutz
07/03/2008 03:07 PM

Jason, You mentioned the application proxy method, but I think you're doing it wrong... /com/domain/Application.cfc  <-- this is the main one /domain.com/Application.cfc extends com.domain.Application <-- nothing but <cfcomponent extends="..." /> inside /domain.com/clientsite1/Application.cfc extends com.domain.Application /domain.com/clientsite2/Application.cfc extends com.domain.Application Hope that makes sense. nathan strutz http://www.dopefly.com/ On Thu, Jul 3, 2008 at 11:01 AM, Jas ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Jason Ho
07/03/2008 03:33 PM

Hi Nathan I guess I missed a small bit of info.. we require subfolders under each client to extend the client's root folder. ie cfwebroot/ cfwebroot/client1 cfwebroot/client1/client1sub1 cfwebroot/client1/client1sub2 cfwebroot/client1/client1sub3 cfwebroot/client2 cfwebroot/client2/client2sub1 cfwebroot/client2/client2sub2 cfwebroot/client2/client2sub3 so client1sub1, client1sub2, and client1sub3 would need to extend the app.cfc in /client1, client2sub1 client2sub2, client2sub3 extends the app.cfc in client2, etc so currently our applicationproxy works for a single client where their files actually sit in the main webroot. ie cfwebroot/ (main application.cfc sits here along with applicationproxy.cfc) cfwebroot/sub1 (application.cfc extends applicationproxy.cfc) cfwebroot/sub2 (application.cfc extends applicationproxy.cfc) cfwebroot/sub3 (application.cfc extends applicationproxy.cfc)Hope that clarifies things a bit further. Jason ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Nathan Strutz
07/03/2008 07:25 PM

Jason, I get it, ok... yeah... you can't do that. well, there are workarounds.... If you really wanted to, you could merge your sub-application methods into your application.cfc, sort of like a duck-type thing. rename the existing methods to super_onRequestStart or something, and make calls to that from your sub-app's objects... That's untested though, but theoretically it ought to trick the system appropriately. nathan strutz http://www.dopefly.com/ On Thu, Jul 3, 2008 at 12:31 PM, Jas ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Jason Ho
07/03/2008 07:47 PM

Thanks Nathan.. Hmmm I think that could get messy, if we grow in the number of sites for the instance. I think we might have to just resort to explicitly naming the app path in the extends parameter, and using ant to  go through and replace it accordingly for each site. I was hoping to find some generic type way of doing to service our clients with a single codebase. I guess it all goes back to the idea of relative/dynamic extension of components which from what I gather isn't possible at all being a compile time issue vs run-time. J ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Wim Lemmens
07/03/2008 04:09 PM

Oh please, not again ;o) I asked the same question. Short answer: you can't, use Apache Long answer: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:56546 Good luck, Wim.

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Jason Ho
07/03/2008 04:13 PM

Wim Thanks for the reply! good to know it can't be done so I can stop looking hah!.. btw.. do you have info on how to do it with Apache? From what I gather, its something to do with virtualhosts? thanks again Jason ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Jason Ho
07/03/2008 06:15 PM

Hi Wim Actually, I took a look at your previous thread http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:56710#307393 and I think I might be in somewhat a slightly different situation although it looks similar to begin with. We run a SaaS app (so codebase is somewhat similar for our clients). Things were working fine with the legacy code and application.cfm. Now with the move towards keeping our code up to date with the latest and greatest.. application.cfc has since stuffed things around in terms of this. I don't think Apache can help us solve this problem either as we're not looking to have multiple sub domains per client ie client1.mycompany.com, etc but rather as mentioned www.mycompany.com/client1 and I couldn't find anyway to implment this with Apache. Please correct me if I'm wrong. For all those that are hosting 3000+ sites per instance, are you guys all still running on application.cfm?!? J ----- Excess quoted text cut - see Original Post for more -----


<< Previous Thread Today's Threads Next Thread >>

Mailing Lists