Search the Site

My Social
Meta
Powered by Squarespace
« My iPhone 3GS and iOS 4 | Main | Adobe Photoshop Lightroom 3 Released »
Thursday
Jul012010

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.

Reader Comments (11)

Thanks so much for this posting. We spent literally a week trying to get it to render the index.cfm file without having to address it directly and your solution finally made that possible.

July 29, 2010 | Unregistered CommenterLamar Brantley

Thanks for these instructions.

I have always been confused as to the webroot used by OSX/Apache/CF. What I didn't realize is that by setting the apache config path to /private/etc/apache2, the CF Installer reads the webroot directory (apache DocumentRoot setting in httpd.conf) and uses it as the default on the next screen "Choose Adobe ColdFusion 9 Administrator Location." I had changed that path thinking I knew better than the installer, and it broke. When I left it to it's default (which for me on OSX 10.6 was /Library/WebServer/Documents ) then it worked. (Minus a typo I had to fix in httpd.conf caused by uninstalling/reinstalling CF).

August 6, 2010 | Unregistered CommenterDarren Cook

I'm on a brand MacMini with SL Server 10.6.4.

CF9 installed without incident. Administrator came right up. When I try to access .cfm files, they don't get processed. I added the jrun handlers as described here and then I get an error 500. I have confirmed that the jrun module is enabled. This is really crazy that it is so hard to install CF9. Any advice? PLEASE!

August 10, 2010 | Unregistered CommenterAndy

Hi Andy,

all I can say; Welcome to the club :)
I've proven that it's possible to get it to function on SL Server. I also know that I've run into the error 500 message a couple of times. I don't recall any specific resolution, but the following list are some of the actions I undertook at the time to get it to run;
- reboot (a lot)
- reinstall the web server (service)
- reinstall Coldfusion
- I even reinstalled the enitre server twice, but that was before Coldfusion and during my escapades with the Open Directory and locking myself out of the system (don't ask).

Some things you want to verify:
- Are php and html files rendering properly? Just to be sure it's the Coldfusion engine that acting like a child.
- What is the logging saying (both the access logs and the error logs for the webserver)?
- Is the Coldfusion log filling up nicely? (located @ /Applications/Coldfusion9/logs/)

If you found the solution in the mean time, please share it here, so we can all benefit from the info Adobe is not giving us :)

August 10, 2010 | Registered CommenterWillem

@Andy & @Willem, Here are some troubleshooting steps I've come up with: I know I wrote down at least one of these because of an error 500. BTW I'm on Snow Leopard, (not SL Server), and I've installed with the MultiServer Config option.

http://darrentcook.wordpress.com/2010/09/13/troubleshooting-cf-9-installation-on-os-x/

Hope one of these steps helps you out!

September 13, 2010 | Unregistered CommenterDarren Cook

I should have commented again sooner. I did everything suggested in the main body of this article. My problem was that even though I thought I was processing .cfm files, the mac had thrown an invisible .html at the end, hence my error 500. All working smoothly now on Mac Mini Server 10.6. I really like Coldfusion 9.

September 13, 2010 | Unregistered Commenterandy

Thank you for this information. It's really helpful

October 13, 2010 | Unregistered CommenterHikmat

Andy,

How did you rid yourself of the hidden .html file? Where did you find it?

Thanks,

John

October 19, 2010 | Unregistered CommenterJohn

Hi John,

not sure what you're referring to. When you're referring to the default document; it's configured in the Server Admin tool.
Server Admin -> Web -> Select the website -> In the General 'tab' -> Default Index Files.

If not, please explain in more detail what you were referring to.

October 20, 2010 | Registered CommenterWillem

OK... now what do we do about OSX 10.7. The install of Lion messed up ColdFusion.

July 22, 2011 | Unregistered CommenterJohn Farrar

Hi John, that's a good one. In fact I haven't tried to upgrade my server yet. I wanted to do it this weekend, but somehow I think I'll do a test-run first in a virtual machine.

I read somewhere that Lion didn't have Java baked-in and since Coldfusion depends on Java, you might want to look into that.

July 22, 2011 | Registered CommenterWillem

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>