<?xml version="1.0" encoding="utf-8"?>
			
			<rss version="2.0" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:cc="http://web.resource.org/cc/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">

			<channel>
			<title>Cutter&apos;s Crossing - Apache</title>
			<link>http://blog.cutterscrossing.com/index.cfm</link>
			<description>ColdFusion Development, Life, and Other Stuff</description>
			<language>en-us</language>
			<pubDate>Tue, 07 Sep 2010 18:12:59 -0400</pubDate>
			<lastBuildDate>Tue, 24 Jul 2007 11:44:00 -0400</lastBuildDate>
			<generator>BlogCFC</generator>
			<docs>http://blogs.law.harvard.edu/tech/rss</docs>
			<managingEditor>web.admin@cutterscrossing.com</managingEditor>
			<webMaster>web.admin@cutterscrossing.com</webMaster>
			<itunes:subtitle></itunes:subtitle>
			<itunes:summary></itunes:summary>
			<itunes:category text="Technology" />
			<itunes:category text="Technology">
				<itunes:category text="Podcasting" />
			</itunes:category>
			<itunes:category text="Technology">
				<itunes:category text="Tech News" />
			</itunes:category>
			<itunes:keywords></itunes:keywords>
			<itunes:author></itunes:author>
			<itunes:owner>
				<itunes:email>web.admin@cutterscrossing.com</itunes:email>
				<itunes:name></itunes:name>
			</itunes:owner>
			<itunes:image href="" />
			<image>
				<url></url>
				<title>Cutter&apos;s Crossing</title>
				<link>http://blog.cutterscrossing.com/index.cfm</link>
			</image>
			<itunes:explicit>no</itunes:explicit>
			
			<item>
				<title>Local Development Setup Pt 4: ColdFusion + Apache + SSL</title>
				<link>http://blog.cutterscrossing.com/index.cfm/2007/7/24/Local-Development-Setup-Pt-4-ColdFusion--Apache--SSL</link>
				<description>
				
				In previous posts we &lt;a href=&quot;http://blog.cutterscrossing.com/index.cfm/2007/7/23/Local-Development-Setup-Pt-1-Apache-and-ColdFusion-7-or-8&quot; target=&quot;_blank&quot;&gt;setup ColdFusion on Apache&lt;/a&gt;, &lt;a href=&quot;http://blog.cutterscrossing.com/index.cfm/2007/7/23/Local-Development-Setup-Pt-2-Multiple-ColdFusion-Instances&quot; target=&quot;_blank&quot;&gt;created multiple ColdFusion instances&lt;/a&gt;, and &lt;a href=&quot;http://blog.cutterscrossing.com/index.cfm/2007/7/23/Local-Development-Setup-Pt-3-Virtual-Directories-in-Apache&quot; target=&quot;_blank&quot;&gt;created Virtual Directories to remote, UNC pathed resources&lt;/a&gt;. What&apos;s left? Well, what if you need to test SSL secure pages? Perhaps you have areas of your sites that need to have secure encryption, where you&apos;re harvesting personal information from your users. No one feels comfortable submitting personal information online if they don&apos;t see that little lock in the bottom of their browser. You, as a developer, want to be able to code this functionality, without the need to test it in your production environment.

With a little work, setting up a secure site within Apache is relatively simple. You already completed your first step when you installed ColdFusion and Apache, because the &lt;a href=&quot;http://www.pangex.com/pub/apache/httpd/binaries/win32/apache_2.0.59-win32-x86-openssl-0.9.7j.msi&quot; target=&quot;_blank&quot;&gt;Apache version you installed was precompiled for SSL&lt;/a&gt;. With a few more steps you&apos;ll be on your way.

Download the &lt;em&gt;openssl.cnf.txt&lt;/em&gt; file from the &lt;em&gt;Download&lt;/em&gt; link below, and place the file in your Apache &lt;em&gt;bin&lt;/em&gt; directory (&lt;em&gt;C:\Program Files\Apache Group\Apache2\bin&lt;/em&gt;). Then, rename the file, removing the &lt;em&gt;.txt&lt;/em&gt; extension. After you&apos;ve done this, you may not see the remaining &lt;em&gt;.cnf&lt;/em&gt; extension in your file browser, and it may say that it&apos;s a &lt;em&gt;SpeedDial&lt;/em&gt; file type. That&apos;s OK, it&apos;s supposed to look that way. The next thing you need to do is copy the &lt;em&gt;ssleay32.dll&lt;/em&gt; and &lt;em&gt;lebeay32.dll&lt;/em&gt; files from your &lt;em&gt;bin&lt;/em&gt; folder into your &lt;em&gt;Windows\System32&lt;/em&gt; folder. Make sure you copy the .dll files and not the .lib files. Now you&apos;re ready to create your personal security certificates.

Open a command prompt and navigate to your &lt;em&gt;bin&lt;/em&gt; folder. Once there you can begin to use the openssl executable to create your certs. You will need one for each secure site you configure. Here we&apos;ll create one for &lt;em&gt;secure.companyname.loc&lt;/em&gt;, by executing the following commands in your console.

&lt;code&gt;
openssl req -config openssl.cnf -new -out secure.csr
&lt;/code&gt;

The .csr file can have any name, but I&apos;ve named it like this so I know that it&apos;s associated with my &apos;secure&apos; domain. Note that you must create a certificate for each &lt;em&gt;fully qualified domain name&lt;/em&gt; that you wish to be secure. The web browser will scream if the domain names don&apos;t match exactly. Here is a step by step of what you should see, with my responses bracketed by percentage signs.

&lt;code&gt;
Loading &apos;screen&apos; into random state - done
Generating a 1024 bit RSA private key
........++++++
.......++++++
writing new private key to &apos;privkey.pem&apos;
Enter PEM pass phrase: %my-made-up-pass%
Verifying - Enter PEM pass phrase: %my-made-up-pass%
-----
You are about to be asked to enter information that will be incorporated into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter &apos;.&apos;, the field will be left blank.
-----
Country Name (2 letter code) []:%US%
State or Province Name (full name) []:%mystate%
Locality Name (eg, city) []:%mycity%
Organization Name (eg, company) []:%companyname%
Organizational Unit Name (eg, section) []:%mydept%
Common Name (eg, your websites domain name) []:%secure.companyname.loc%
Email Address []:%username@companyname.com%

Please enter the following &apos;extra&apos; attributes
to be sent with your certificate request
A challenge password []:%my-made-up-pass%
&lt;/code&gt;

This will create the &lt;em&gt;.csr&lt;/em&gt; file. Now, on to the next step, the private key file.

&lt;code&gt;
openssl rsa -in privkey.pem -out secure.key
Enter pass phrase for privkey.pem:%my-made-up-pass%
writing RSA key
&lt;/code&gt;

Ok, now that we have a private key all that&apos;s left is to get a certificate.

&lt;code&gt;
openssl x509 -in secure.csr -out secure.cert -req -signkey secure.key -days 365
Loading &apos;screen&apos; into random state - done
Signature OK
subject=/C=US/ST=mystate/L=mycity/O=companyname/OU=mydept/CN=secure.companyname.loc/emailAddress=username@companyname.com
Getting Private key
&lt;/code&gt;

Alright, now you have your certificate for your &apos;secure&apos; domain. Create, within your Apache &lt;em&gt;conf&lt;/em&gt; folder, two new folders &lt;em&gt;ssl.cert&lt;/em&gt; and &lt;em&gt;ssl.key&lt;/em&gt;, and move your &lt;em&gt;secure.cert&lt;/em&gt; and &lt;em&gt;secure.key&lt;/em&gt; files into their respective folders. You may also delete the &lt;em&gt;.rnd&lt;/em&gt; file from your Apache &lt;em&gt;bin&lt;/em&gt; folder. This file contains entropy information for creating the key and could be used for cryptographic attacks against your private key. Although this isn&apos;t likely within your local development environment, it is still good practice.

As this is for your local environment, this is a simple way of creating a self-signed certificate for development use. All you have to do is install the certificate in your browser the first time you come to a secure page. Also note that this certificate expires after a year, and you can increase the &lt;em&gt;-days 365&lt;/em&gt; if you want.

Now we start getting into actually configuring your server for your SSL connection. First you will want to remove the comment hash (#) from the LoadModule line for &lt;em&gt;ssl_module modules/mod_ssl.so&lt;/em&gt;. This is generally the last line of the LoadModule descriptors in your &lt;em&gt;httpd.conf&lt;/em&gt; file.

&lt;code&gt;
# SGB: [072408]: Enabling SSL
LoadModule ssl_module modules/mod_ssl.so
&lt;/code&gt;

Next you&apos;ll find the IfModule block below:

&lt;code&gt;
&lt;IfModule mod_ssl.c&gt;
	Include conf/ssl.conf
&lt;/IfModule&gt;
&lt;/code&gt;

And add a few necessary lines:

&lt;code&gt;
&lt;IfModule mod_ssl.c&gt;
	Include conf/ssl.conf
&lt;/IfModule&gt;
# SGB [072408]: Some added config for our SSL
SSLMutex default
SSLRandomSeed startup builtin
SSLSessionCache none
ErrorLog logs/ssl.log
LogLevel info
&lt;/code&gt;

It is &lt;strong&gt;very&lt;/strong&gt; important that you move this descriptor block &lt;strong&gt;below&lt;/strong&gt; the &lt;em&gt;JRun Settings&lt;/em&gt; descriptor block. When you define which instance serves your secure pages you want it to know the JRun is needed.

The next step took a great deal of trial and error to get straight. First, make a backup copy of the &lt;em&gt;ssl.conf&lt;/em&gt; file. Then, within the original file, we&apos;re going to make several changes. First, comment (with a hash sign [#]) the opening and closing IfDefine tags near the top and very bottom of the file.

&lt;code&gt;
# SGB [072408]: Removed for proper load
#&lt;IfDefine SSL&gt;
	....
# SGB [072408]: Removed for proper load
#&lt;/IfDefine&gt;
&lt;/code&gt;

And, set it up for &lt;em&gt;NameVirtualHost&lt;/em&gt;, just as you did within your &lt;em&gt;httpd.conf&lt;/em&gt;, but with the correct port for SSL.

&lt;code&gt;
# SGB [072408]: Enable NameVirtualHost configurations on SSL
NameVirtualHost 127.0.0.1:443
&lt;/code&gt;

Next, remove the entire VirtualHost block from the file. This is loaded with lines and lines of comments, is already in your backup file for later reference, and only confuses what is needed (and caused me errors somewhere anyway). We&apos;ll setup a &apos;secure&apos; VirtualHost entry for your secure domain, using the certificate and key you created before.

&lt;code&gt;
# SGB [072408]: &apos;secure&apos; SSL domain setup directive
&lt;VirtualHost 127.0.0.1:443&gt;
	DocumentRoot &quot;C:\Documents and Settings\username\My Documents\wwwroot\siteroot&quot;
	ServerName secure.companyname.loc
	ServerAdmin username@companyname.com
	ErrorLog logs/secure-ssl-error.log
	TransferLog logs/secure-ssl-access.log
	SSLEngine On
	SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
	SSLCertificateFile conf/ssl.cert/secure.cert
	SSLCertificateKeyFile conf/ssl.key/secure.key
	&lt;FilesMatch &quot;\.(cgi|shtml|phtml|cfm|cfc|php3?)$&quot;&gt;
		SSLOptions +StdEnvVars
	&lt;/FilesMatch&gt;
	&lt;Directory &quot;C:\Documents and Settings\username\My Documents\wwwroot\siteroot&quot;&gt;
		SSLOptions +StdEnvVars
	&lt;/Directory&gt;
	SetEnvIf User-Agent &quot;.*MSIE.*&quot; \
			 nokeepalive ssl-unclean-shutdown \
			 downgrade-1.0 force-response-1.0
	CustomLog logs/ssl_request_log \
			  &quot;%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \&quot;%r\&quot; %b&quot;
&lt;/VirtualHost&gt;
&lt;/code&gt;

OK, what&apos;s left? Oh yeah! We need a ColdFusion instance to associate it with (in this case the &apos;sites&apos; instance). And, we&apos;ll probably need those Aliases too. Easy enough. Just add your &lt;em&gt;Include&lt;/em&gt; statements.

&lt;code&gt;
# SGB [072408]: &apos;secure&apos; SSL domain setup directive
&lt;VirtualHost 127.0.0.1:443&gt;
	DocumentRoot &quot;C:\Documents and Settings\username\My Documents\wwwroot\siteroot&quot;
	ServerName secure.companyname.loc
	ServerAdmin username@companyname.com
	ErrorLog logs/secure-ssl-error.log
	TransferLog logs/secure-ssl-access.log
	SSLEngine On
	SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
	SSLCertificateFile conf/ssl.cert/secure.cert
	SSLCertificateKeyFile conf/ssl.key/secure.key
	&lt;FilesMatch &quot;\.(cgi|shtml|phtml|cfm|cfc|php3?)$&quot;&gt;
		SSLOptions +StdEnvVars
	&lt;/FilesMatch&gt;
	&lt;Directory &quot;C:\Documents and Settings\username\My Documents\wwwroot\siteroot&quot;&gt;
		SSLOptions +StdEnvVars
	&lt;/Directory&gt;
	SetEnvIf User-Agent &quot;.*MSIE.*&quot; \
			 nokeepalive ssl-unclean-shutdown \
			 downgrade-1.0 force-response-1.0
	CustomLog logs/ssl_request_log \
			  &quot;%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \&quot;%r\&quot; %b&quot;
	Include conf/cf_sitesinstance.conf
	Include conf/site_aliases.conf
&lt;/VirtualHost&gt;
&lt;/code&gt;

That&apos;s it! Restart your Apache server and go to &lt;em&gt;https://secure.companyname.loc&lt;/em&gt; (make sure your put a test &apos;index.cfm&apos; in there). First you will be asked to accept the development certificate that you created, and then you should see your test message display, with the little lock down in the corner.

And that is how to configure ColdFusion (7 or 8) on top of Apache, in a multi-instance configuration, with virtual, UNC pathed directories, SSL support, and access to your instance administrators. Verify your instance settings, setup your Data Sources, fire-up CFEclipse, checkout from the Subversion repository, and get to writin&apos; some code!
&lt;hr /&gt;
&lt;strong&gt;Resources:&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.mattwoodward.com/blog/index.cfm?event=showEntry&amp;entryID=0193080A-0DB2-8838-F92AEFB0B5EB675E&quot; target=&quot;_blank&quot;&gt;Apache + SSL on Windows (Yes, Windows)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.thompsonbd.com/tutorials/apachessl.php&quot; target=&quot;_blank&quot;&gt;Apache SSL Tutorial&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://livedocs.adobe.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=ColdFusion_Documentation&amp;file=00001773.htm&quot; target=&quot;_blank&quot;&gt;Web server configuration for application isolation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
And a hellavalotta trial and error. No one, single post answered every issue (some didn&apos;t even answer one issue by itself), and so...here it is. 
				</description>
				
				<category>Apache</category>				
				
				<category>ColdFusion</category>				
				
				<category>ColdFusion 8</category>				
				
				<category>Development</category>				
				
				<pubDate>Tue, 24 Jul 2007 11:44:00 -0400</pubDate>
				<guid>http://blog.cutterscrossing.com/index.cfm/2007/7/24/Local-Development-Setup-Pt-4-ColdFusion--Apache--SSL</guid>
				
				
				<enclosure url="http://blog.cutterscrossing.com/enclosures/openssl.cnf.txt" length="2956" type="text/plain"/>
				
			</item>
			
			<item>
				<title>Local Development Setup Pt 3: Virtual Directories in Apache</title>
				<link>http://blog.cutterscrossing.com/index.cfm/2007/7/23/Local-Development-Setup-Pt-3-Virtual-Directories-in-Apache</link>
				<description>
				
				In a previous post we touched upon the &lt;em&gt;Alias&lt;/em&gt; statement in your &lt;em&gt;VirtualHost&lt;/em&gt; directives. An &lt;em&gt;Alias&lt;/em&gt; is a way of defining a virtual directory for your site. This is a pretty common practice in the web world. Your site code may be stored in your site&apos;s root (wwwroot) folder, but you may want to store your assets (images, video, stylesheets, etc.) outside your webroot. You might even want to store them on another server altogether. You&apos;ll want to access these items as if they&apos;re part of your site, like &lt;em&gt;http://username.companyname.loc/Images/mypic.jpg&lt;/em&gt; or &lt;em&gt;http://username.companyname.loc/Media/myvideo.flv&lt;/em&gt;.

Defining an &lt;em&gt;Alias&lt;/em&gt; is easy, when dealing with your local file system. An &lt;em&gt;Alias&lt;/em&gt; that points to a UNC path, in Windows, is another story. You have to use a UNC path because Apache will not allow you to utilize a mapped drive (it&apos;ll crash Apache, at least under 2.0). What took me a while to figure out was that you can not use Apache to control the directory access (as in permissions), you must do this through the user account access. You &lt;strong&gt;can not&lt;/strong&gt; use the &lt;em&gt;Directory&lt;/em&gt; Apache directives for access control. This also means that your Apache instance must run as the user who has access to the remote resource (I also setup CF instance to run as the same user).

I also discovered something else the hard way, Apache Aliases are case-specific. This means that you have to use double Aliases for each virtual directory that you define via an Alias. Remember, this is Windows, so code can go either way. You&apos;ll want to plan for either eventuality.

In our last post we defined a &apos;sites&apos; instance, for the display of a mythical, templated application system. So, imagine that each site of that system would require it&apos;s own &lt;em&gt;VirtualHost&lt;/em&gt; directive. Each one, though, would also be using shared media resources from the same location outside the webroot, like on a media server. For this, you can create another include in your Apache &lt;em&gt;conf&lt;/em&gt; folder - &lt;em&gt;site_aliases.conf&lt;/em&gt;, within which you could singularly define your remote virtual directories:

&lt;code&gt;
Alias /Images/ //remote-serv1/Inetpub/wwwroot/Images/

Alias /images/ //remote-serv1/Inetpub/wwwroot/Images/

Alias /Video/ //remote-serv1/Inetpub/wwwroot/Video/

Alias /video/ //remote-serv1/Inetpub/wwwroot/Video/

Alias /Styles/ //remote-serv1/Inetpub/wwwroot/Styles/

Alias /styles/ //remote-serv1/Inetpub/wwwroot/Styles/

Alias /SiteSpecific/ //remote-serv1/Inetpub/wwwroot/SiteSpecific/

Alias /sitespecific/ //remote-serv1/Inetpub/wwwroot/SiteSpecific/
&lt;/code&gt;

Once you&apos;ve defined these remote shared resources, you can then &lt;em&gt;Include&lt;/em&gt; them in your site definitions in your &lt;em&gt;VirtualHost&lt;/em&gt; directives:

&lt;code&gt;
&lt;VirtualHost 127.0.0.1:80&gt;
	ServerAdmin username@companyname.com
	# Root folder for thisdomain.com, in the &apos;sites&apos; instance
	DocumentRoot &quot;C:\Documents and Settings\username\My Documents\wwwroot\siteroot&quot;
	ServerName *.thisdomain.loc
	# SGB [072007]: shared Alias Include
	Include conf/site_aliases.conf
	ErrorLog logs/thisdomain.loc-error.log
	CustomLog logs/thisdomain.loc-access.log common
	# SGB [072007]: Add include for the &apos;sites&apos; ColdFusion instance
	Include conf/cf_sitesinstance.conf
&lt;/VirtualHost&gt;
&lt;/code&gt;

Once you&apos;ve restarted your Apache instance you will be able to access these resources as part of the domain. 
				</description>
				
				<category>Apache</category>				
				
				<category>ColdFusion</category>				
				
				<category>ColdFusion 8</category>				
				
				<category>Development</category>				
				
				<pubDate>Mon, 23 Jul 2007 08:02:00 -0400</pubDate>
				<guid>http://blog.cutterscrossing.com/index.cfm/2007/7/23/Local-Development-Setup-Pt-3-Virtual-Directories-in-Apache</guid>
				
				
			</item>
			
			<item>
				<title>Local Development Setup Pt 2: Multiple ColdFusion Instances</title>
				<link>http://blog.cutterscrossing.com/index.cfm/2007/7/23/Local-Development-Setup-Pt-2-Multiple-ColdFusion-Instances</link>
				<description>
				
				Our last post discussed installing &lt;a href=&quot;http://www.apache.org&quot; target=&quot;_blank&quot;&gt;Apache&lt;/a&gt; and &lt;a href=&quot;http://www.adobe.com/products/coldfusion/&quot; target=&quot;_blank&quot;&gt;ColdFusion&lt;/a&gt;, as well as configuring your default instance for Apache access. Now it&apos;s time to create additional ColdFusion instances.

By default, ColdFusion (or, more appropriately, JRun) is only configured to utilize 512MB of RAM per instance, and is only capable of accessing 1024MB. This is due to a limitation of 32bit JVMs, and will someday be formerly addressed by Adobe. But that doesn&apos;t mean that you are necessarily restricted to only using 1GB of RAM for ColdFusion. You may define multiple instances of the server, each of which will address it&apos;s own memory space, it&apos;s own instance of the JVM, and it&apos;s own instance of ColdFusion (and JRun). Not only does this allow you to utilize more of the memory available to you today, in our high powered systems, but it will also sandbox applications that are separated into their own instances.

For instance: Let&apos;s say you have a dynamic template application. One that reads the requested URL and supplies customized content dependent upon the site identified. Any number of sites could be configured in a database, rendered by the same code, off of a single instance of ColdFusion (or a clustered set of instances, maybe). You could have a &apos;sites&apos; instance of ColdFusion that served this content. Now, the same set of sites might require a backend administrator, or content management system, for the configuration of those sites. You might set this up on a single domain name, with users logging in to their specific set of tools and data. It would be it&apos;s own application, with dynamic options and data according to the user logging in. This might be placed in another &apos;control&apos; instance of ColdFusion.

Setting up additional instances of ColdFusion is easy, but requires a small bit of manual effort when working with Apache. First of all, the connectors for JRun and Apache are not completed automatic, so you need to setup a few folders on the file system. Find the root directory for JRun. The default location is &lt;em&gt;C:\JRun4&lt;/em&gt;. You are creating folder for the connectors, which will be located in the &lt;em&gt;{JRun Root}\lib\wsconfig&lt;/em&gt;. Notice that there is already a subdirectory titled &lt;em&gt;1&lt;/em&gt;. This is the connector for your default ColdFusion instance. You&apos;ll want to create an empty subdirectory for each instance you setup, named exactly as you will name your instances. According to the above example, you want to create a &apos;sites&apos; directory, and a &apos;control&apos; directory.

Your next step requires logging into the ColdFusion Administrator of your default ColdFusion instance. In our last post we setup a url for accessing this, &lt;em&gt;http://username.companyname.loc/CFIDE/Administrator&lt;/em&gt;. Once you&apos;ve logged in, in the default instance (and only the default instance) you will see an option at the bottom of the menu for &lt;strong&gt;Enterprise Manager&lt;/strong&gt;. You&apos;ll want to select this, and it&apos;s sub-item, &lt;strong&gt;Instance Manager&lt;/strong&gt;. Here you will see a &lt;em&gt;samples&lt;/em&gt; instance that is already defined, though disabled. This is the instance for running the sample applications that ship with ColdFusion. To create a new instance you simply select &lt;strong&gt;Add New Instance&lt;/strong&gt;. This will bring up the new instance dialog. In the server name type &apos;sites&apos; (exactly as you named the folder, including case) and select the &lt;strong&gt;Create Windows Service&lt;/strong&gt; option, then hit &lt;strong&gt;Submit&lt;/strong&gt;. That&apos;s it! ColdFusion automatically goes through a four step process to create your new instance, giving you status updates along the way. Once it&apos;s complete, go back to the &lt;strong&gt;Instance Manager&lt;/strong&gt; and do the same thing for your &apos;control&apos; instance.

OK, so you have new instances, but Apache still can&apos;t talk to them yet. We need to do a little more work on the Apache config before we can really start to play. The first thing you&apos;ll need to do here is locate the &lt;em&gt;JRun Settings&lt;/em&gt; block in your httpd.conf. It&apos;ll look very similar to this:

&lt;code&gt;
# JRun Settings
LoadModule jrun_module &quot;C:/JRun4/lib/wsconfig/1/mod_jrun20.so&quot;
&lt;IfModule mod_jrun20.c&gt;
	JRunConfig Verbose false
	JRunConfig Apialloc false
	JRunConfig Ssl false
	JRunConfig Ignoresuffixmap false
	JRunConfig Serverstore &quot;C:/JRun4/lib/wsconfig/1/jrunserver.store&quot;
	JRunConfig Bootstrap 127.0.0.1:51000
	#JRunConfig Errorurl &lt;optionally redirect to this URL on errors&gt;
	#JRunConfig ProxyRetryInterval &lt;number of seconds to wait before trying to reconnect to unreachable clustered server&gt;
	#JRunConfig ConnectTimeout 15
	#JRunConfig RecvTimeout 300
	#JRunConfig SendTimeout 15
	AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc .cfr .cfswf
&lt;/IfModule&gt;
&lt;/code&gt;

Alright, some major points to notice here. Two big lines to look at for multiserver configuration stuff, the &lt;em&gt;Serverstore&lt;/em&gt; and the &lt;em&gt;Bootstrap&lt;/em&gt;. These will be different for each instance of ColdFusion. You probably already recognize most of the path in the &lt;em&gt;Serverstore&lt;/em&gt; value. The &apos;control&apos; and &apos;sites&apos; instance folders that you had created will replace the &lt;strong&gt;1&lt;/strong&gt; in your new definitions. The &lt;em&gt;Bootstrap&lt;/em&gt; value comes from each instance&apos;s &lt;em&gt;port&lt;/em&gt; setting in it&apos;s &lt;em&gt;JRunProxyService&lt;/em&gt;. To get this value, go to that instance&apos;s &lt;em&gt;jrun.xml&lt;/em&gt; file, located at &lt;em&gt;C:\JRun4\servers\&lt;strong&gt;[instance name]&lt;/strong&gt;\SERVER-INF\jrun.xml&lt;/em&gt;. Open this file and find the following &lt;em&gt;service&lt;/em&gt; definition block:

&lt;code&gt;
&lt;service class=&quot;jrun.servlet.jrpp.JRunProxyService&quot; name=&quot;ProxyService&quot;&gt;
	&lt;attribute name=&quot;activeHandlerThreads&quot;&gt;25&lt;/attribute&gt;
	&lt;attribute name=&quot;backlog&quot;&gt;500&lt;/attribute&gt;
	&lt;attribute name=&quot;deactivated&quot;&gt;false&lt;/attribute&gt;
	&lt;attribute name=&quot;interface&quot;&gt;*&lt;/attribute&gt;
	&lt;attribute name=&quot;maxHandlerThreads&quot;&gt;1000&lt;/attribute&gt;
	&lt;attribute name=&quot;minHandlerThreads&quot;&gt;1&lt;/attribute&gt;
	&lt;attribute name=&quot;port&quot;&gt;51002&lt;/attribute&gt;
	....
&lt;/code&gt;

Two things you need here. First, make sure that the &lt;em&gt;deactivated&lt;/em&gt; attribute is set to &lt;strong&gt;false&lt;/strong&gt;. Next, write down the &lt;em&gt;port&lt;/em&gt; value. So, if you are in the &lt;em&gt;jrun.xml&lt;/em&gt; of your &apos;control&apos; instance, and the &lt;em&gt;port&lt;/em&gt; is &apos;51020&apos;, then write that down (control: 51020) and do the same for your &apos;sites&apos; instance. Also remember that you will need to restart these instances after changing the &lt;em&gt;deactivated&lt;/em&gt; attribute.

Next, let&apos;s break out the default ColdFusion instance specific information and place it inside it&apos;s own include config file. In your Apache &lt;em&gt;conf&lt;/em&gt; directory, create a new file - &lt;em&gt;cf_defaultinstance.conf&lt;/em&gt;. In this file we&apos;ll place those settings we want for our default instance:

&lt;code&gt;
&lt;IfModule mod_jrun20.c&gt;
	JRunConfig Verbose false
	JRunConfig Ignoresuffixmap false
	JRunConfig Serverstore &quot;C:/JRun4/lib/wsconfig/1/jrunserver.store&quot;
	JRunConfig Bootstrap 127.0.0.1:51000
&lt;/IfModule&gt;
&lt;/code&gt;

With these settings now within their own include, we can now remove them from the &lt;em&gt;httpd.conf&lt;/em&gt; file:

&lt;code&gt;
# JRun Settings
LoadModule jrun_module &quot;C:/JRun4/lib/wsconfig/1/mod_jrun20.so&quot;
&lt;IfModule mod_jrun20.c&gt;
	JRunConfig Verbose false
	JRunConfig Apialloc false
	JRunConfig Ssl false
	JRunConfig Ignoresuffixmap false
	#JRunConfig Serverstore &quot;C:/JRun4/lib/wsconfig/1/jrunserver.store&quot;
	#JRunConfig Bootstrap 127.0.0.1:51000
	#JRunConfig Errorurl &lt;optionally redirect to this URL on errors&gt;
	#JRunConfig ProxyRetryInterval &lt;number of seconds to wait before trying to reconnect to unreachable clustered server&gt;
	#JRunConfig ConnectTimeout 15
	#JRunConfig RecvTimeout 300
	#JRunConfig SendTimeout 15
	AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc .cfr .cfswf
&lt;/IfModule&gt;
&lt;/code&gt;

Notice that I just commented them out. You can remove the entirely if you like, but I&apos;m gonna leave it. Next I&apos;m going to adjust my &lt;em&gt;VirtualHost&lt;/em&gt; for my default instance administrator access:

&lt;code&gt;
#
# Use name-based virtual hosting.
#
NameVirtualHost 127.0.0.1:80

	....

&lt;VirtualHost 127.0.0.1:80&gt;
	ServerAdmin username@companyname.com
	# Root folder for my scratchpad stuff
	DocumentRoot &quot;C:\Documents and Settings\username\My Documents\wwwroot&quot;
	ServerName username.companyname.loc
	# Alias for /CFIDE, which the CF install placed in my Apache webroot.
	# This is solely for our dev environment, and would not be a good practice
	# within a production environment
	Alias /CFIDE &quot;C:/Program Files/Apache Group/Apache2/htdocs/CFIDE&quot;
	&lt;Directory &quot;C:/Program Files/Apache Group/Apache2/htdocs/CFIDE&quot;&gt;
		AllowOverride All
		Order allow,deny
		Allow from all
	&lt;/Directory&gt;
	ErrorLog logs/username.companyname.loc-error.log
	CustomLog logs/username.companyname.loc-access.log common
	# SGB [072007]: Add include for default ColdFusion instance
	Include conf/cf_defaultinstance.conf
&lt;/VirtualHost&gt;
&lt;/code&gt;

Now &lt;em&gt;username.companyname.loc&lt;/em&gt; is setup to use the default ColdFusion instance. Next, setup an include for your &apos;control&apos; instance. In Apache&apos;s &lt;em&gt;conf&lt;/em&gt; directory, create another config file - &lt;em&gt;cf_controlinstance.conf&lt;/em&gt;. Remember those &lt;em&gt;port&lt;/em&gt; numbers you wrote down from the &lt;em&gt;jrun.xml&lt;/em&gt; files? It&apos;s in the &lt;em&gt;Bootstrap&lt;/em&gt;:

&lt;code&gt;
&lt;IfModule mod_jrun20.c&gt;
	JRunConfig Verbose false
	JRunConfig Ignoresuffixmap false
	JRunConfig Serverstore &quot;C:/JRun4/lib/wsconfig/control/jrunserver.store&quot;
	JRunConfig Bootstrap 127.0.0.1:51020
&lt;/IfModule&gt;
&lt;/code&gt;

Then you could define a special domain for accessing the &apos;control&apos; instance&apos;s ColdFusion Administrator, by adding another &lt;em&gt;VirtualHost&lt;/em&gt; directive to the Apache config:

&lt;code&gt;
&lt;VirtualHost 127.0.0.1:80&gt;
	ServerAdmin username@companyname.com
	# Root folder for a &apos;control&apos; instance
	DocumentRoot &quot;C:\Documents and Settings\username\My Documents\wwwroot\admin&quot;
	ServerName control.companyname.loc
	# Alias for /CFIDE, each CF instance has it&apos;s own CFIDE.
	# This is solely for our dev environment, and would not be a good practice
	# within a production environment
	Alias /CFIDE &quot;C:/JRun4/servers/control/cfusion.ear/cfusion.war/CFIDE&quot;
	&lt;Directory &quot;C:/JRun4/servers/control/cfusion.ear/cfusion.war/CFIDE&quot;&gt;
		AllowOverride All
		Order allow,deny
		Allow from all
	&lt;/Directory&gt;
	ErrorLog logs/control.companyname.loc-error.log
	CustomLog logs/control.companyname.loc-access.log common
	# SGB [072007]: Add include for the &apos;control&apos; ColdFusion instance
	Include conf/cf_controlinstance.conf
&lt;/VirtualHost&gt;
&lt;/code&gt;

Notice the different path for the CFIDE folder. Each created instance will have a unique CFIDE. Also notice that I changed the &lt;em&gt;DocumentRoot&lt;/em&gt; path, to reflect the root of the application I&apos;ll use with the instance. Now that you&apos;ve setup your &apos;control&apos; instance, config, and VirtualHost, you can do the same thing for your &apos;sites&apos; instance. Just watch your &lt;em&gt;port&lt;/em&gt; value, &lt;em&gt;Serverstore&lt;/em&gt; path, and &lt;em&gt;CFIDE&lt;/em&gt; and &lt;em&gt;DocumentRoot&lt;/em&gt; paths. 
				</description>
				
				<category>Apache</category>				
				
				<category>ColdFusion</category>				
				
				<category>ColdFusion 8</category>				
				
				<category>Development</category>				
				
				<pubDate>Mon, 23 Jul 2007 08:01:00 -0400</pubDate>
				<guid>http://blog.cutterscrossing.com/index.cfm/2007/7/23/Local-Development-Setup-Pt-2-Multiple-ColdFusion-Instances</guid>
				
				
			</item>
			
			<item>
				<title>Local Development Setup Pt 1: Apache and ColdFusion (7 or 8)</title>
				<link>http://blog.cutterscrossing.com/index.cfm/2007/7/23/Local-Development-Setup-Pt-1-Apache-and-ColdFusion-7-or-8</link>
				<description>
				
				OK, so now that we are moving to localized development it has become necessary to learn how to configure our desktops for running a localized copy of our sites. The trick here is the complexity of our setup. We have multiple sites, sharing the same code base, accessing media from external resources. We also have to setup for multi-instance, to separate our front-end site and our back-end administration. We also need to be setup for one SSL site. Oh yeah, and we have to do it on Apache, since XP pro&apos;s version of IIS has some limitations about running multiple domains simultaneously. To top it all off (at least in my case) I also have to run Apache 2.0.59 so that I can also run Subversion, which is not yet compatible with Apache 2.2.  [More]
				</description>
				
				<category>Apache</category>				
				
				<category>ColdFusion</category>				
				
				<category>ColdFusion 8</category>				
				
				<category>Development</category>				
				
				<pubDate>Mon, 23 Jul 2007 08:00:00 -0400</pubDate>
				<guid>http://blog.cutterscrossing.com/index.cfm/2007/7/23/Local-Development-Setup-Pt-1-Apache-and-ColdFusion-7-or-8</guid>
				
				
			</item>
			
			<item>
				<title>CFMX7 and Apache 2.2.4</title>
				<link>http://blog.cutterscrossing.com/index.cfm/2007/1/16/CFMX7-and-Apache-224</link>
				<description>
				
				&lt;p&gt;So, in my infinite wisdom, and much to the dismay of my wife, I decided to replace my server with a new (used) one. A slightly more powerful machine that a friend of mine was going to put on &lt;a href=&quot;http://www.freecycle.org&quot; target=&quot;_blank&quot;&gt;FreeCycle&lt;/a&gt; (Thanks Patti!), I thought it was perfect to go ahead and make some changes to my dev environment. I want to begin using &lt;a href=&quot;http://subversion.tigris.org/&quot; target=&quot;_blank&quot;&gt;Subversion&lt;/a&gt;, plus I figured I would go ahead and switch to CF on top of &lt;a href=&quot;http://httpd.apache.org/&quot; target=&quot;_blank&quot;&gt;Apache&lt;/a&gt; (since IIS Sucks!), not to mention setting up CF on the multiserver install. Hey, why not.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.stephencollins.org/&quot; target=&quot;_blank&quot;&gt;Stephen Collins&lt;/a&gt; has a fine document called the &lt;a href=&quot;http://www.acidlabs.org/extras/acme/&quot; target=&quot;_blank&quot;&gt;ACME guide&lt;/a&gt; (for the uninitiated) that thoroughly covers setting up a basic, free development environment: &lt;a href=&quot;http://httpd.apache.org/&quot; target=&quot;_blank&quot;&gt;Apache&lt;/a&gt;, &lt;a href=&quot;http://www.adobe.com/products/coldfusion/&quot; target=&quot;_blank&quot;&gt;ColdFusion&lt;/a&gt;, &lt;a href=&quot;http://www.mysql.org&quot; target=&quot;_blank&quot;&gt;MySQL&lt;/a&gt;, (&lt;a href=&quot;http://www.cfeclipse.org&quot; target=&quot;_blank&quot;&gt;CF&lt;/a&gt;)&lt;a href=&quot;http://www.eclipse.org&quot; target=&quot;_blank&quot;&gt;Eclipse&lt;/a&gt;. I thought this would be a good place to start, but didn&apos;t realize that Apache had upgraded their server before &lt;a href=&quot;http://blog.acidlabs.org/&quot; target=&quot;_blank&quot;&gt;AcidLabs&lt;/a&gt; could update the ACME guide. Whoops! ColdFusion install completes but Apache won&apos;t restart!&lt;/p&gt;  [More]
				</description>
				
				<category>Apache</category>				
				
				<category>ColdFusion</category>				
				
				<category>Development</category>				
				
				<pubDate>Tue, 16 Jan 2007 22:33:00 -0400</pubDate>
				<guid>http://blog.cutterscrossing.com/index.cfm/2007/1/16/CFMX7-and-Apache-224</guid>
				
				
			</item>
			</channel></rss>