July 9, 2007

Alfresco WCM virtualisation for ColdFusion

Filed under: Alfresco — Marcus @ 12:08 pm

If you’ve tried Alfreso’s WCM, you’d know that in current releases (pre 2.1), there’s not a great deal of functionality for building dynamic websites, and that the existing platform is more geared around the management of the administration of content assets that are served over the web, as opposed to providing the tools to build and present websites. (2.1 does introduce a lot more features for this though).  Where these assets are java based, the existing Alfresco virtual server works great; for others, not so great.  Recently I had to have ColdFusion virtualised via Alfresco’s WCM; here’s how.

The goal is simple; get ColdFusion changes to be previewable out of user sandboxes.

  1. Download Railo. Other ColdFusion engines may work, however this was the first one that correctly ran the application I was working with.
  2. Import your ColdFusion application to Alfresco. Extract the Railo war file’s WEB-INF directory to the the root of the webapp inside Alfresco

Unfortunately, if you start the virtualisation server now, you’ll receive errors due to the Railo server not being able to correctly read/write to the AVM directly. What you need to do is very similar to how the virtual server does things, but a little less directly.

  1. Download and extract a new tomcat application server
  2. Mount the Alfresco AVM as a CIFS drive on the server:
    mount -t smbfs -o username=admin,password=admin //alfresco_a/AVM /opt/alfresco/shares/avm
  3. Modify the newly extracted tomcat’s conf/server.xml file to map the requests to the correct sandbox
    <Host name=”domain.www–sandbox.127-0-0-1.ip.alfrescodemo.net” appBase=”/opt/alfresco/shares/avm/domain/HEAD/DATA/www/avm_webapps”>
    <Context path=”" docBase=”ROOT”/>
    </Host>
    <Host name=”admin.domain.www–sandbox.127-0-0-1.ip.alfrescodemo.net” appBase=”/opt/alfresco/shares/avm/domain–admin/HEAD/DATA/www/avm_webapps”>
    <Context path=”" docBase=”ROOT”/>
    </Host>

Alfresco takes the domain and port to use from the virtual server’s alfresco.virtserver.domain configuration located in virtual-tomcat/conf/alfresco-virtserver.properties file. The example above is the default, but chances are it’ll need to change. The more important one is the alfresco.virtserver.http.port configuration; you’ll have 3 tomcat instances running, and you need to make sure this port is that of the tomcat configured earlier. The virtual server MUST be running for the Alfresco web client to use the correct domain:port combination for your faux-virtual server.

When starting the servers, make sure to start the Alfresco WCM instance first as it needs to be up and running for mapping to its CIFS interface, before the faux-virtual server can be started.

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

You must be logged in to post a comment.

.

Powered by WordPress