With multiple projects running locally I prefer to use virtual hosts so I can browse to http://project1.local and http://project2.local rather than http://127.0.0.1/project1 and http://127.0.0.1/project2

This is really easy in IIS ( point and click ).

Apache you have to touch some configuration files but there is alot of information out there on this.

With Resin it's also quite simple but there is far less information about this available.

I put together this walk through on the process.

And if your wondering about the performance of resin ( free edition ) Peter Bell's response should give you some confidence.

I run about 70 websites on Railo and Resin on a Win2k3 64bit server
with 8Gb of RAM and have excellent performance. Not to say it wouldn't
be better if I used the professional version.


http://groups.google.com/group/railo/msg/047ea89dea7c9385

Sample Virtual host block:



High Quality Version click here.





Related:
Setting up Resin Express.



Download and install java sdk ( I used 1.6.17 ) ( note you need the JDK not JRE )
Download glassFish
Download ColdFusion 8 or 9
Download Apache

I used Windows Server 2008 64bit but the process is the same for 32bit or Win 2k3.  It's also ( obviously ) different on linux or unix but not majorly.

When installing glassFish did not detect java home correctly so I provided the location via the cmd line.


The install is very straight forward I did not select anything unusual and just clicked through:

Once glassFish was installed I started the server:



Then browse to:  http://127.0.0.1:4848 to get to the admin console.


I choose to leave the admin with no authentication so it will just load to the console.

Before you look at the console we will need to create a ColdFusion war.  Run the ColdFusion installer and select "JEE Configuration"

This will produce the war file ready for deployment.  For me the output was c:\coldFusion9\cfusion.war

Now go back to the control panel.  Select "Applications" from the menu.  Then select "Deploy".  Choose a file from the local file system and leave the name as cfusion.


Once the application is deployed we can launch it by clicking launch button and you will see:

404 error's.  This is because there are no .cfm files if you went to /CFID/administrator you would would be at the CFADMIN.

I'll skip the CFADMIN and make a index.cfm:

Contaning:





Reload the Original page that was launched by clicking "Launch"

And ColdFusion 9 is running on GlassFish.

This is on port 8080 but I want it to run behind apache on port 80 without the /cfusion

Make sure IIS is not running. Install Apache.  Apache for windows come with all the modules you're likely to need but most are commented out.  Test to make sure Apache is runnign and http://127.0.0.1 should the standard message "It works".

Now we will setup the proxy.

Around line 110 of httpd.conf uncomment 2 modules mod_proxy.so and mod_proxy_connect.so



Also un-comment


Open {apacheInstallDir}\conf\extrahttpd-vhosts.conf

create a new vhostBlock


I created a dummy entry in the Windows host file so http://cf9gf resolves locally. I'll be using this as the test domain.

Restart apache and look for errors.


If there are no errors you should now be ready to proxy from apache to glassFish on port 80.


Done.

Now GlashFish is no longer listed here: http://www.adobe.com/products/coldfusion/systemreqs/ but it still works fine.

Also note the /flex2gateway works fine aswell.
Ever needed to compare a ColdFusion hash() directly in MS SQL? I did today and I knew I had accomplished this before but forgot how to do it. Searching the net and twitter I came to some dead end or longish solutions. I knew Steve Good and I worked this out once before but I also remember there being an easier way.

Well there is and here is where I took the solution from: http://orangepips.instantspot.com/blog/Database

The funny thing is I found this nearly a year ago and actually commented on the post just forgot all about it.





The result:

I put this together almost immediately after CF9 was released but even before then I had some people contact me to ask how CF9 runs on both Windows 7 and Windows server 2008.

Answer?

It works fine on both.

If you have ever tried to install ColdFusion 7/8 on Windows Vista after Service pack 1, Windows 7 or Windows server 2008 with IIS at one stage you have undoubtedly come across this:

"HTTP Error 404.3 - Not Found
The page you are requesting cannot be served because of the extension configuration.
If the page is a script, ad a handler. If the files should be downloaded, add a MIME map."


ColdFusion 9 error

Well with CF9 and Windows Server 2008 your going to get the same issue. It's actually an easy fix and almost identical to the Windows 7 / Vista solution just visually a little different here is a walk through of the installation. Note this is CF9 64 bit on Windows Server 2008 64bit and just in case you missed it 64bit is now available in ColdFusion standard:


High Quality video click here
.



BTW this will also work for CF8.

Oh and if your trying to run CF9 32 bit on Windows server 2008 64bit again don't forget 64 bit is part of standard.
I wiped my Old(ish) Macbook and upgraded to Snow Leopard this gave my Core Duo 1.8ghz 2g ram macbook a lease of new life. I needed to re-setup my local dev enviroment and noticed a few people where unsure how to setup vhosts with apache default install with OSX 10.6/10.5/10.4 so here it is step by step.

Edit the hosts file to add a local DNS entry.


Add the domain name you wish to use 127.0.0.1 is the loopback IP do not change this IP.


Create the folders and files for the local website. I chose to place the log files for apache in the site folder and the website content under a sub folder www.


Edit httpd.conf I used path finder here to show the locations.


You can also use VI or any text editor


On line 465 uncomment: Include /private/etc/apache2/extra/httpd-vhosts.conf and save the file.


Edit: /etc/apache2/extra/httpd-vhosts.conf


Add in the details of the new virtual host and save:
( I'm running Railo on Tomcat locally so I have so additional parameters )

I also set my logging levels to log as much as possible.

Notice the location of the logs files matched the access.log and error.log files created earlier



Run: apachectl -t
to confirm there are no syntax errors.
I choose to leave the example sites, they cause a warning but it wont stop apache.
Then restart apache: sudo apachectl restart


Create a test file in the new folder for the virtual host ( /Users/Paul/Sites/paulsDev/www )


Confirm the new virtual host works:


If you'd like to watch the logs in a terminal you can use tail:
tail -f /the/Path/to/the/log/file


BTW Dave made a great How-to on setting up Tomcat and Railo on OSX which you can view here.