Installing ColdFusion 10 under MAMP Pro 2 on OS X Lion

I’ve been attending a whole host of ColdFusion 10 Developer Week 2012 sessions this week, and got inspired to upgrade my development machine to run ColdFusion 10. I had previously been running CF9 (developer) and MAMP Pro 2.0.5. These instructions will allow you to remove CF9 and install CF10. Installing and configuring MAMP Pro is up to you.
Update: Added a note near the end of the instructions. Basically, make sure you edit the httpd.conf file in MAMP Pro or the changes may be overwritten.

Here’s the process I used to get everything setup and working properly:

  • Backup any settings for your current web server setup (if any). Make sure you keep a copy of any config files – just in case.
  • In the OS X System Preferences app, under Sharing, disable Web Sharing. You don’t want a competing installation of Apache to derail you.
  • If you have ColdFusion 9 running, open the ColdFusionLauncher.app and shut down ColdFusion 9. Move the ColdFusion9 install directory out of /Applications, just to make sure it’s not in the way. Also, look in /Library/StartupItems and move the ColdFusion9 folder. Where you put these two folders doesn’t matter, but don’t put them in the same place since they’re name the same.
  • Download and install MAMP Pro. I used all default options throughout the install process. For me, this resulted in two folders in my Applications folder: MAMP and MAMP Pro.
  • Run MAMP Pro. The first time through, a MAMP PRO folder is created at /Users/username/Library/Application Support/appsolute/ that contains your MAMP PRO settings files. You will need this info in a minute.
  • Make sure you can access the default website created by MAMP. I ended up creating a new folder for my web development. It is located at /Users/username/Documents/Websites. Make sure you replace username with your username. You will need this location in a bit too. Of course, you can change this location to be anywhere you like.
  • Browse to /Users/username/Library/Application Support/appsolute/ and make a backup of httpd.conf right now. It may save you some potential grief.
  • In MAMP Pro, Click the Stop button to turn off MAMP.
  • Download ColdFusion 10 from Adobe. You will need to sign in with an Adobe account, but you can create one if you don’t already have one. There’s only one version for OS X now, which simplifies things. Version 9 came in 32 bit and 64 bit versions – there’s no distinction anymore on OS X
  • Mount the DMG you downloaded and run the ColdFusion 10 Installer.
    • On the Introduction screen, click Next.
    • On the License Agreement screen, click I accept the terms of the License Agreement and then click Next.
    • On the Install Type screen, click the Developer Edition checkbox, and then click Next. No license is required to install the developer edition.
    • On the Installer Configuration screen, select Server configuration, and then click Next.
    • On the Subcomponent Installation screen, select the subcomponents you want (i selected everything) and then click Next.
    • On the Secure Profile screen, you can choose whether or not you want to turn on RDS or not. I did, so I checked Enable and then entered my IP address subnet (ie. 10.2.2.*). Click Next.
    • On the Remote Component Administrator Credentials screen (which I think only shows up if you enable the Secure Profile option in the previous step), enter an Admin username (admin), and a password. Adobe really wants you to use a secure password, so just follow the prompts if you don’t enter something hard enough. Make a note of it. Click Next.
    • On the Select Installation Directory screen, click Next (unless, of course, you want to install it elsewhere – make a note of where you install it if this is the case).
    • On the Earlier Versions of Adobe ColdFusion Installed screen, select No, and then click Next.
    • On the Configure Web Servers/Websites screen, select Configure web server connector for ColdFusion, and then click Add. The following step won’t succeed, but you have to do it anyway to continue the install process.
      • In the Add Web Server Configuration window, select Web Server Apache.
      • For the Configuration directory, click the … button and browse to /Users/username/Library/Application Support/appsolute/. Click on, but don’t open the MAMP PRO directory, and then click Select. If you click into the MAMP PRO directory, it will choose the wrong path for you.
      • For the Directory and file name of server binary, click the … button and browse to /Applications/MAMP/bin/apache2/bin. Scroll down and find httpd and click select.
      • For the Directory and file name of server control script, click the … button and browse to /Applications/MAMP/bin/apache2/bin. Scroll down and find apachectl and click select.
      • Click OK.

      Click Next to finish the Configure Web Servers/Websites screen.

    • On the Configure OpenOffice screen, select whether or not you want to install the OpenOffice connector, and then click Next.
    • On the Administrator Credentials screen, enter a username and password for the ColdFusion Administration console (same password rules as the Secure Profile step earlier), and then click Next.
    • On the Server Updates screen, choose whether or not to check for updates. The intention is for Adobe to better keep you informed of updates and patches to ColdFusion, Java, etc…. Click Next.
    • On the Current User Password screen, enter your OS X user password, and then click Next.
    • On the Pre-installation Summary screen, verify your choices (what little Adobe chooses to review with you) and then click Install.
    • All components will be installed EXCEPT for the final configuration piece necessary to make things work.
  • Next, we need to run the Web Server Configuration utility. If MAMP is running, you may have problems with this step. Make sure MAMP is not running. The WSConfig utility can be found at /Applications/ColdFusion10/cfusion/runtime/bin/wsconfig. Just double click that file to run it. The WSConfig utility looks very similar to the step earlier where we pick the server and binaries for Apache. With that in mind, here’s how to configure it:
    • AppServer Host: localhost
    • Web Server: Apache
    • Configuration directory: click the … button and browse to /Users/username/Library/Application Support/appsolute/. Click on, but don’t open the MAMP PRO directory, and then click Select. If you click into the MAMP PRO directory, it will choose the wrong path for you.
    • Click the Advanced… Button.
    • For the Directory and file name of server binary, click the … button and browse to /Applications/MAMP/bin/apache2/bin. Scroll down and find httpd and click select.
    • For the Directory and file name of server control script, click the … button and browse to /Applications/MAMP/bin/apache2/bin. Scroll down and find apachectl and click select.
    • Leave the other advanced settings alone and click OK.
    • Click OK to close the Add Web Server Configuration window. You will receive a confirmation window asking to attempt to restart the web server. Click No.
    • The WSConfig utility will attempt to add the requisite bits to the httpd.conf file located at /Users/username/Library/Application Support/appsolute/MAMP Pro/. It will also add a file to the MAMP PRO directory called mod_jk.conf. In httpd.conf, it will make a number of changes to add support for ColdFusion. In my httpd.conf file I found a line at the bottom:

      # DONT REMOVE: MAMP PRO httpd.conf template compatibility version: 10
      Include "/Users/blang/Library/Application Support/appsolute/MAMP PRO/mod_jk.conf"

      This nicely encapsulates all the CF configuration into one external .conf file.
      I also found this section had been modified:

      #
      # DirectoryIndex: sets the file that Apache will serve if a directory
      # is requested.
      #
      <IfModule dir_module>
      DirectoryIndex index.cfm index.html index.php
      </IfModule>
  • You should now be able to close out of the WSConfig utility, close any Terminal window that was opened when you ran the utility, and go back and restart MAMP Pro.
  • UPDATE:Make sure to edit your httpd.conf file in MAMP Pro. For some reason, changes to that file in other text editors get overwritten by MAMP Pro. You need to have the changes detailed just above for MAMP Pro to work properly with ColdFusion.

Did it work? It did for me. I was able to browse to http://127.0.0.1/CFIDE/administrator/index.cfm or http://localhost/CFIDE/administrator/index.cfm to finish the ColdFusion configuration – CF performs a first-run cleanup/setup step the first time you visit the ColdFusion Administrator page. Once that is done, you can log into the CF Administrator using the credentials you created during install, and configure the server to your heart’s content. You can also use MAMP Pro to configure as many websites as you want to run on your developer machine.

I hope this helps someone out there… the first time I ran through this process with CF9 and MAMP Pro, it took a lot of trial and error (mostly error) to get it working.

If you have any questions, post them here, and I’ll try to help. I know what worked for me, but I may not be able to help everyone.

20 thoughts on “Installing ColdFusion 10 under MAMP Pro 2 on OS X Lion”

  1. Thank you! The next to the last bullet point in your post is what I need. The installer did not update httpd.conf correctly. Be sure to change the user in the mod_jk.conf Include statement.

  2. Brian,

    I’ve tried following your instructions for MAMP, CF10 and OSX, but I couldn’t get it to work at all, the CF Administrator would never show for me.

    I followed the wsconfig instructions found on this post, and it worked first time:

    http://www.ryanjeffords.com/blog/entry/setting-up-a-solid-local-development-environment-using-coldfusion-9-apache-and-mysql-on-mac-os-x

    The only difference is I am using the free version of MAMP, although I did try it in the ‘Pro trial’ mode, with the same poor result.

    hope that helps,

    Pete.

    1. The free version of MAMP uses entirely different configuration directories than the paid version from what I understand.
      Good to hear you got it working.

      And sorry for the long time to reply – I didn’t realize that comments had been set to auto close after 30 days. I’ve fixed that now…

  3. Im trying to contact you for some help connecting CF10 to MAMP 2.05 but this is the only way on your site to contact you.
    Basically I have everything setup like you mentioned in your post but when I try to pull up a CF page it pulls it up in plaintext (tags and all) so the CF page isnt beign processed.
    When I try to pull up the cfide/administrator/index.cfm I keep getting a permissions denied.
    Any idea what I might be missing?
    Thanks

    1. Oops. Comments were set to auto close after 30 days, and I missed seeing notifications until I was checking something else today. Sorry.

      My guess is that you need to double, and triple check your httpd.conf file in MAMP Pro.
      Go to File -> Edit Template -> Apache -> httpd.conf
      I noticed that if you try to edit this file while MAMP is running, it will often silently revert to a previous version. Make sure MAMP is not running, make your changes, and then start it up again.

      Make sure this line is present (modified to the correct path on your system):

      Include "/Users/blang/Library/Application Support/appsolute/MAMP PRO/mod_jk.conf"

      And make sure that this section is also present:

      #
      # DirectoryIndex: sets the file that Apache will serve if a directory
      # is requested.
      #
      <ifmodule dir_module>
      DirectoryIndex index.cfm index.html index.php
      </ifmodule>

      Beyond that, I’m not sure what else to suggest. These worked for me…

      1. I tried all this and still no go. I ended up uninstalling and re-installing both CF10 and MAMP PRO. The httpd.conf undated this time (with the web server off). Then I tried to process a cfm file and same thing. Then I saw that the http.conf file deleted the updates. Adding them back in did the trick and now everything is good in my little world.
        Thanks for the help Brian!!!

        1. Good to hear you got it working. I’m not sure why I didn’t see your comment before today – for some reason I’m not getting notifications. <puts on debugging hat>

    1. Good to hear you got it working. I think I’ll go back and update the article to make it clear to edit the template in MAMP Pro – changes to the httpd.conf file don’t seem to “stick” otherwise.

    1. What I am noticing now is that if I watch the Apache log via MAMP — when I try to flip open the RDS connection in Builder Apache reports this error: [Fri Oct 26 11:01:42 2012] [error] [client 127.0.0.1] File does not exist: /Applications/ColdFusion10/cfusion/wwwroot/CFIDE/main

      1. Ok so then I remembered that CFIDE typically needs a Dir Alias to it’s real origin — that way cfform, etc works. So when I added a Dir Alias in MAMP.. same thing — I get: [Fri Oct 26 11:01:42 2012] [error] [client 127.0.0.1] File does not exist: /Applications/ColdFusion10/cfusion/wwwroot/CFIDE/main Is my install corrupt? Do you guys have a main folder? Or is this created by RDS enabled and my RDS really isn’t enabled?

        1. well I gave up ;) I had a much easier time just using Lion’s built-in apache2. Got it working after uninstalling MAMP & CF and starting over using built-in apache.

  4. Awesome. i didn’t catch the very end where you enter: Include “/Users/blang/Library/Application Support/appsolute/MAMP PRO/mod_jk.conf”
    Changed blang to my own username and voila, was able to start up CF10. I did one thing different, left CF9 in tack. I had CF 10 import the settings and it worked great.

  5. Great write up! Worked out perfect in the end.

    I did get a bit confused with the section where you’re first required to select the httpd. Reason why, because there are two set of “Application Support/appsolute” directory folders. One being in the root/library/application support/appsolute and the other /users/username/library/application support/appsolute. Just saying, or could be just my setup. But after a little bit of trial and error of discovering the two set of folder I did finally get my coldfusion apps up and running.

    I appreciate your documentation on setting it up.

  6. Great help… Interestingly enough, not 20 minutes after I got this working on my MBP, The CF admin alerted me to an update that supposedly supports Mavericks (1/10/14 @ 2:48pm)… Not sure if it truly solves the issue since I was up and running before the update, but just an FYI

    1. It will be interesting to see if you can install CF10 under Mavericks without having to go to all kinds of troubles to get it working. I’m still on Mountain Lion myself. If it’s not broke, don’t fix it is my motto at present.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>