New ColdFusion 8.0.1 instances in OSX Leopard

ColdFusion , Mac Add comments

Creating the new coldFusion instance

  • login to the main coldfusion administrator (e.g. http://localhost/cfide/administrator)
  • go to enterprise manager / instance manager
  • select 'add new instance'
  • enter a server name (e.g. 'newcfusion')
  • leave server directory as default (/Applications/JRun4/servers)
  • leave create from EAR/WAR blank
  • submit form and wait for everything to finish
  • the link you are provided to continue will probably be broken so ignore and click on 'instance manager' again
  • open the /Applications/JRun4/ColdFusionLauncher.app and select your instance and click start if it is not running already
  • click the button next to your instance name to launch the adminstrator and configure your instance (e.g.http://localhost:8301/cfide/administrator)

Hooking the new instance into a specific apache website

For and apache website to talk to a specific jrun (CF) instance you need to bind an apache virtual host to a jrun proxyport for your coldfusion instance

  • make sure the admin jrun instance is started
  • browse to http://localhost:8000 and login with admin and the administrator password you gave when installing coldfusion
  • click the new instance from the left nav, and click services
  • you then need to note down the proxyPort (e.g. 51000) and click the green play button to start the proxyService
  • open up the httpd.conf or the apache vhost site config file and inside your <virtualHost> add:

<ifModule mod_jrun22.c>
# override the default bootstrap in the httpd.conf to bind to my new coldfusion instance
JRunConfig Bootstrap 127.0.0.1:51000
</ifModule>

  • restart apache after the cfinstance is running and it should now be using the new instance

Autostarting your new instance at system boot

You need to use a program like smultron to edit the file ColdFusion8Multi in /Library/StartupItems/ColdFusion8Multi and add: su $RUNTIME_USER -c "$CF_DIR/bin/jrun -stop newcfusion" under the line su $RUNTIME_USER -c "$CF_DIR/bin/jrun -stop cfusion" in the if block, and also outside the if block: su $RUNTIME_USER -c "$CF_DIR/bin/jrun -start newcfusion >& $CF_DIR/logs/newcfusion-event.log &" basically the same lines already present in ColdFusion8Multi but replace cfusion with your instance name, also make sure the log file has write permission!

2 responses to “New ColdFusion 8.0.1 instances in OSX Leopard”

  1. Ben Densmore Says:
    Hi Dave,
    are there any other steps involved in this? I have a new instance set up in CF. I have a virtual host created and have added the IfModule section into the virtualhost. For some reason the instance is still using the main cfusion instance.

    Thanks,
    Ben
  2. David Sirr Says:
    Hi Ben, i'd say at this point you need to ensure that the virtual host is actually being picked up instead of one of the other virtual hosts or the main config. A good way to do this is to specify a custom access log for that virtual host and see if entries appear when you access your site...



    if it turns out that it's not getting to your virtual host, then make sure you are using a unique servername that's not being caught by another apache mapping...

Leave a Reply





Powered by Mango Blog. Design and Icons by N.Design Studio