Installing Adobe Coldfusion 9 on OSX Server 10.6.4

After Apple updated the Mac mini to it's current form (mid 2010), I decided that it was time to start replacing my 'faithful' Windows 2003 server with something a bit less power consuming. The original Mac Mini was basically a consumer device, but a while back, Apple released a server version of the device. The main differences are:

  • Only 1 CPU model available (2.66GHz at this moment)
  • No DVD drive
  • 2 * 500GB internal disks
  • OSX 10.6.4 Server edition (unlimited clients)

Basically everything you could ever need for a server with a very small footprint.

The installation of Coldfusion is not straight forward. Not that I expected it to be [1], [2], [3], but one keeps hoping on an installer that actually installs the complete package, and where you don't have to edit files yourself to get it to work. It's not that it's the very first version of the scripting engine......

Anyway, the installer guides you through everything needed to INSTALL the software. Getting it to work comes next....

It seems that the installer can't find the running webserver on the OSX server. In my case (and probably everyone else); Apache2.

By default the Apache2 configuration file is located in /private/etc/apache2, something the installer can't figure out. So you have to point it to the correct directory.

Apache2 config file locationIf you have some exotic webserver, you can imagine that the installer needs some pointing in the right direction. FAIL #1 on the installer.

After the installer is ready, you have the option to (automatically) launch the web configuration part of the installation by opening http://127.0.0.1/CFIDE/admininstrator/index.cfm. Only the installer opens a completely different (incorrect) URL. In my case I've seen the following URL's (in different browsers);

  • http://localhost:127:9100/CFIDE/administrator/index.cfm
  • http://127.0.0.1:9100/CFIDE/administrator/index.cfm
  • http://127.0.0.1:127.0.0.1:9100/CFIDE/administrator/index.cfm

Somehow, it's difficult to transport the correct URL to the browser (FAIL #2). It mixes the localhost up with the IP address for localhost, AND it uses the standalone Coldfusion integrated web server port 9100. Weird since I specifically told the installer that I didn't use that feature.
Anyway, the correct URL is:

http://127.0.0.1/CFIDE/administrator/index.cfm

After launching the web configuration tool the service is installed (but won't work as advertised).

It seems that .cfm files do get processed, but only when you address them directly. So http://www.example.com/index.cfm works fine, but http://www.example.com results in the download (or) plaintext/sourcecode of the index.cfm file, or a html presentation with the variables showing. Even when you've specified that the default index file is index.cfm (by default it's index.htm, or index.php in OSX Server). FAIL #3.

It turns out that the Handler for the cfm files isn't added to the Apache2 configuration by the Coldfusion installer. I found this blog post that mentions the jrun-handler. After adding this to the OSX Webserver settings it worked (so far). So both http://www.example.com/ and http://www.example.com/index.cfm gets properly processed by the Coldfusion engine.

Server Admin Webserver settingsIf you want to do it by hand (at your own risk) you need to modify the /private/etc/apache2/httpd.conf file, and add the following lines in the (Add)Handler section (you'll recognize it when you see it);

AddHandler jrun-handler cfm
AddHandler jrun-handler cfml
AddHandler jrun-handler cfc
AddHandler jrun-handler cfr
AddHandler jrun-handler jsp
AddHandler jrun-handler jws
AddHandler jrun-handler cfswf

Next stop is MySQL configuration under Coldfusion. If that leads to new annoyances (and it probably will knowing Adobe), you'll read about it here and/or on Twitter.

Oh, the final FAIL in this endeavor is related to the well written and available (installation) documentation regarding the installation of Adobe Coldfusion 9 for OSX. Which simply does not exist.....

All this made me realize that commercial software isn't always better than free alternatives (in this case e.g. PHP). Both Coldfusion and PHP are scripting languages. Both tightly integrate with several popular webservers. PHP has an excellent installer (no need to guess-edit configuration files for basic operational functionality), but lacks a decent interface for configuration (it's all text-files). Coldfusion on the other hand has a crappy installer (ever since my first experiences with version 5), but an excellent interface for the Coldfusion configuration (data sources, mail, reporting etc.).

I'll be waiting for the day that Coldfusion has a decent installer. Until that time; I'll be complaining about it, since it's a nice language to experiment in.

Posted on July 1, 2010 and filed under Apple, Software, Tips'n Tricks.