Friday, May 25, 2012

Installing ColdFusion MX7 on Windows 2008 R2 64bit

Trying to install ColdFusion MX7 on Win 2008 R2 was giving me all sorts of errors. The server installed without any issues but IIS sites could not be configured to server up cfm pages.

There were a couple of things I had to do to get this to work.

Enabled IIS6 features on Win2008 machine as follows:

  • Control Panel > Programs and Features > Turn Windows Features On or Off >
  • This will open the "Server Manager".
  • Expand Roles>Web Server>
  • On right panel, under "Summary>Role Services>" click on "Add Role Services".
  • In the "Add Role Services" window, select all options under "Management Tools>IIS 6 Management Compatibility"
  • Click on Install.

Change AppPool for the Website to 32-bit

  • Open IIS Manager
  • Expand MachineName> Application Pools>
  • Right click on AppPool name (eg: DefaultAppPool) and select "Advanced Settings"
  • Change "Enable 32-bit Applications" to "true". Click OK

Configure Websites to Run ColdFusion pages

I ran the Web Server Configuration Tool, added a site and got the following error message "Version 7.5 is installed. Supported versions are 4.x, 5.x, 6.x". Basically, Windows 2008 R2 has IIS7.5 and the Web server configuration tool that comes with ColdFusion MX7 was created before IIS7 was created and so it does not support it. So the alternative was to configure the sites manually to run with ColdFusion. This is where I got some help from Sameer of His post ColdFusion Manual Configuration was very helpful.

  • Open \runtime\servers\coldfusion\SERVER-INF\jrun.xml . Find “ProxyService” and change value of deactivated to "false"
  • Restart ColdFusion
  • Create file: \cfroot\untime\ib\sconfig\
  • Edit it as follows:
  • Save the file

  • Extract files from wsconfig.jar into a temp directory
  • Copy jrunwin32.dll and jrun_iis6.dll from extracted files to cfroot\runtime\lib\wsconfig\.
  • Copy jrun_iis6_wildcard.dll from extracted files to cfroot\runtime\lib\wsconfig\1.

  • Create the file cfroot\runtime\lib\wsconfig\1\jrun_iis6_wildcard.ini. Edit it as follows:  

Notes: bootstrap port number for ColdFusion 9 is 51800, for ColdFusion 7 and 8 port number is 51011, for ColdFusion 6 the port number is 51010. 
  • Create the file in cf_root\runtime\lib\wsconfig\1. Edit as follows: 

Note: for MX 6.1; for MX 7/8; for MX9

  • Under the IIS Management Console, click on your computer name, click on "ISAPI and CGI Restrictions" and add two entries: 
one for cfroot\runtime\lib\wsconfig\1\jrun_iis6_wildcard.dll and the other for cfroot\runtime\lib\wsconfig\jrun_iis6.dll. Set permission for both to "allowed". 
You can give whatever name you want; something like "Macromedia Server Extensions"

  • Click on your computer name and click on “Handler Mappings” and add one "Wildcard Script Map" with foll. params:
    Requestpath:  * 
    Executable:  C:\CFusionMX7\runtime\lib\wsconfig\1\jrun_iis6_wildcard.dll
  • After adding wildcard script map, add script handlers for *.cfm files with foll. params:
Request Path: *.cfm
  • Similarly add handler for *.cfc files 
  • Just to be sure, restart ColdFusion as well as IIS. And you should be all set.

No comments: