I've had ColdFusion 8 running on OS X 10.5 (Leopard) and hooked to Apache 2.2.6 for a while now. However, two things have occurred that are prompting me to write this blog entry. First, I've gotten several questions on exactly how I got things working - even with the other blog entries that outline a similar process. Second, I ran into an odd issue Friday when configuring everything on my new work MacBook Pro.
This is a small part of an article I'm writing for the Fusion Authority Quarterly Update Volume 2 Issue 4, due out in February. The information is so important I felt it could not wait, and am publishing this with permission from Fusion Authority. In this blog post, I will discuss the installation issue and its resolution, and provide my consolidated, easy steps for getting ColdFusion 8 hooked to Apache 2.2.x on Leopard.
Friday's issue manifested itself during the installation of ColdFusion 8. If you choose to "hook" CF8 to Apache during the install process, to have CF8 start during system startup, or to install the multiserver configuration, the installer will prompt you to enter your OS X password. After entering my password, I received a message stating I could not install CF8 because it appeared I did not have the appropriate permissions. The installer went on to say it determined this by attempting to create a folder in /Library/StartupItems/.
To troubleshoot the issue I performed several tests. First, I entered an incorrect OS X password in the password and password confirm fields. The CF8 installer gave me the same message. That confirmed I was probably dealing with a permissions issue. To double-check, I entered the passwords in again - this time the correct ones - and still received the same message. At this point, I wanted to verify my OS X password by logging out of Leopard and back in again. Before doing that, I decided to change my password to something that didn't include special characters (like $$ signs), thinking these characters could be throwing off the installer commands. After logging out and back in again and trying the installer with my new password, I received the same error message. On a hunch, I decided to check the permissions of the native OS X CF8 installer file. Comparing the permissions of the file to another OS X machine showed a difference, "Staff" and "Everyone" had read only access on my work machine, while the machine that already had ColdFusion 8 installed showed read/write permissions for all users/groups. To change the permissions on my work machine, I clicked the lock icon in the bottom right corner of the File Info window. After giving Staff and Everyone read/write access, I was back in business and the ColdFusion installer worked. So why did this occur on my new machine and not others? It's probably because I dragged the CF8 installer file from a USB drive to my MacBook Pro. I haven't tested this, but I've read OS X handles file permissions differently, depending on whether you actually "copy" a file or drag it from place to place.
Now, for my steps on getting ColdFusion 8 installed and hooked to Apache on Leopard:
1. Download CF8 installer from http://www.adobe.com/go/trycoldfusion
2. Double-click the installer file to launch the wizard.
3. As you progress through the screens, be sure to select Multiserver Configuration (I always multi-instance CF).
4. On the Configure Web Server screen, select the option to configure a Web server. Select Apache in the drop-down.
For Configuration Directory type: "/private/etc/apache2"
NOTE: Other bloggers have mentioned typing "/etc/apache2" here. This is also fine as that directory is a symbolic link to the REAL directory /private/etc/apache2.
For Directory and file name of server binary type: "/usr/sbin/httpd"
For Directory and file name of server control script type: "/usr/sbin/apachectl"
Click Ok.
5. The installer will do its thing and then you'll get a message about successfully installing CF8 BUT that the Web server and/or Web site do not appear to be running. You're directed to start the Web server and then run the Configuration Wizard:
http://localhost:80/CFIDE/administrator/index.cfm
Just click Ok when you see the message above and move to the next step.
6. Download the recompiled, 64-bit Web server connector from Scott Pinkston:
http://www.scottpinkston.org/Downloads/mod_jrun22_64.zip
7. Make sure Apache is stopped. In Terminal, navigate to the /usr/sbin directory and type "sudo apachectl stop"
8. Copy mod_jrun22.so from the zip you downloaded and paste it into the following directory:
/Applications/JRun4/lib/wsconfig/1/.
9. Restart Apache. From /usr/bin in Terminal, type "sudo apachectl start &". The ampersand instructs OS X to start the Apache process in the background. This keeps the process from being attached to your Terminal session.
10. Stop all CF/JRun services (just in case they are running). From /Applications/JRun4/bin/ type "./jrun4 stop cfusion" and "./jrun4 stop admin" and "./jrun4 stop samples". Don't worry about the messages you get from typing the commands.
11. Open Activity Monitor (the OS X app) and look for any services called "jrun." If any are listed (be sure "All processes" is listed in the drop-down at the top of Activity Monitor), quit them by selecting them and pressing the Quit button, then the Force Quit button to confirm.
12. Start CF8 in Terminal: from /Applications/JRun4/bin type: "./jrun4 start cfusion &"
13. Go to your browser and visit http://localhost/CFIDE/administrator/index.cfm. Be sure and type the filename (index.cfm). You will be prompted to enter your CF Admin password, at which point CF will run through the configuration process and direct you to the CF Admin.
Now you can go back to Apache and set up Virtual Hosts or add "index.cfm" to the global DirectoryIndex directive.
For more Apache/CF goodness, check out Cutter's awesome series on setting up your development environment and look for my upcoming article in the Fusion Authority Quarterly Update.













Any ideas?
I think the problem may be that I'm running 10.5 server on the machine. It's configured a bit differently.
At the end of /etc/apache2/httpd.conf, there is a line that includes all files in the ./sites directory. In that directory, there is a configuration file created for each Virtual Host. Using a stock install, there is a file in the sites directory called 0000_any_80.conf (meaning accessed via any hostname/ip on port 80). Edit this file, and insert the "index.cfm" to the DirectoryIndex directive in this file.
I think that my problem was I was adding it to a DirectoryIndex directive in the main httpd.conf file -- which was getting overridden by the included files.
Hope that help anyone else who might be having this problem.
AddHandler jrun-handler .cfm .cfml .cfc