This is more a "note to self" than anything else, but here you go...
I've been messing about with the Multi server set up for CFMX7. J2EE applications, Clustering and multiserver installations is something I haven't really looked at since umm... CF4.5.1, so I thought it was time to look at it all over again.
I had a few hassles, but with Andy Allan of the Scottish CFUG's help I've now ironed out all the wrinkles on my dev server set up.What I've got is Apache 2.0.55, with Jrun 4 Updater 6 running multiple CF instances and sites, one of which is actually my test bed for this blog. (Bit naughty really seeing as I run CFMX standard with IIS on my production server, but you have to try these things out some how!)
Anyway, here's the steps to a working install.
- Install Apache
- Install CFMX 7.01 using option 2 (Multi-Server install)
- Do another install of CFMX 7.01 using option 3 (J2EE install) making an cfusion.ear file
- Use something like winrar to unzip the ear file into a folder called cfusion-ear
- Extract the cfusion.war into cfusion-war folder
- Hang onto the cfusion.ear file, so you don't have to build it again, but delete the cfusion.war file out of the folder structure
- Edit the application.xml file in the cfusion-ear/META-INF folder - change the web-uri to cfusion-war rather than cfusion.war
- Create your various instances for your various websites in the Java Management Console (JMC)
- Remove the default-ear folder from the server instance folder for each instance that will be running CFMX
- Copy the cfusion-ear folder into the server folder for each instance
- Set up your websites in Apache using virtual hosts
- Use the wsconfig tool to connect the first Java Server Instance to apache
- Edit your httpd conf file.
JRunConfig Ssl false
AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc .cfswf .cfr
LoadModule jrun_module "C:/JRun4/lib/wsconfig/1/mod_jrun20.so"
- Change the port number on the bootstrap for each website to point at the appropriate Java Server Instance.
- Change the Serverstore variable to point to different numbered folders for each website and create these folders. You can put a copy of the jrunserver.store file in there, but its not required.
- Go into cfusion-ear\cfusion-war\WEB-INF for each server, edit the web.xml file and uncomment the SES URL settings
- Go into the SERVER-INF folder for each instance and edit the jrun.xml. Set the deactivated attribute to "false" under the jrun.servlet.jrpp.JRunProxyService class, if it isn't already.
- Start your instances and start your apache server (or restart as appropriate)
- and thats it....