Jrun, Multiple ColdFusion Instances, Apache, and Virtual Hosts
One of my first tasks at my new job was to set up the new development and staging environment for our web site. We have two Linux boxes with ColdFusion Enterprise running. These two boxes sit behind hardware load balancer. Pretty cool setup and sure beats the one windows box that also ran SQL Server and about 5 other department apps that I used to be responsible for.
For the staging setup, I have one CF instance running on each server. The load balancer sits in front doing round robin with sticky sessions turned on. That set up was relatively strait forward.
But for the development environment, it got a little more complicated. On one of the servers, we wanted to be able to deploy additional CF instances, one for each developer. There are about 8 instances in all. Originally, we were just going to use the JRun Web Server (JWS) to server the development instances. But that got ugly for a few different reasons.
First, configuring the webroot, aliases and other settings for the JWS is done in a messy set of XML files. Each instance has its own xml file, so the same configuration had to happen multiple times. Not very DYR. Second, each new instance was served over a different port, 8300,8301,8302, etc. I was constantly getting confused as to which port belong to which developer. Finally, it just felt wrong to have one web server in development, and another in production. I think it goes without saying that development should match as closely as possible the production environment.
So for all these reasons, I wanted to get apache all wired up to be the single webserver for all of these CF instances. In the end, everything I needed to know could be found on one of these sites:
Configuring ColdFusion Multiple Instances with Apache Virtual Hosts... Again
Web server configuration for application isolation
Installing and Configuring ColdFusion MX 6.1 Multiple Instances with IIS and Apache Virtual Hosts
There was one step the tripped me up, and lead to almost an entire day wasted. It had to do with the proxy port that each instance would be listening to allowing Apache to talk to it. This proxy service is set up by default when you create an new instance using ColdFusion Enterprise manager. After I created each instance, I checked the Jrun management console to verify that the proxy service was configured and running. Every time, everything looked great. roxy port configured and running. So what was the problem???
It seems you MUST EDIT the jrun.xml file. In this file, there is a line
So now, each developer has his own DNS, tim.server.com, bob.server.com, etc. Each DNS goes through apache. All web server configuration is done in one place, and common aliases only need to be configured once. All in all, this is a pretty nice setup. For someone that has never had the pleasure of using CF Enterprise, I must say I'm liking multiple instances!
But one lesson learned, dont forget the jrun.xml file and the magic "deactivated" line.

There are no comments for this entry.
[Add Comment]