Tips Using CF8 Instances with JRun4 and Apache on Windows

The goal is to run completely separate ColdFusion servers, with unique webroots, using the same install of Apache 2.2.x on Windows. This is particularly useful

[More]

Blank CF8 CFGRID

You've coded the CFGRID tag exactly the way the livedocs say to do it, and you get a gray line or perhaps an empty box with a gray border, but no grid, no data.

You need to map your site to the CFIDE folder. It is required.

If you are using Apache on Windows, check out this entry to find out how to make CFGRID work correctly: How to Map Apache Virtual Hosts to CFIDE

How to Map Apache Virtual Hosts to CFIDE

There are certain features in Coldfusion, specifically but not limited to CF8, that require direct access to the CFIDE folder. Note that it is possible to run your CF8 apps with Apache HTTP Server without having direct access to CFIDE. But when you decide to try a new feature of CF8, like the AJAX functionality (CFGRID for example) it will not work and it will not error out. There could be other bizarre functionality as well, yet to be identified.

To prevent this from happening to you, here is how you map to the CFIDE folder from all of your apache-based virtual hosts. First let me point out that my webroot/documentroot is set for C:\www and I have a virtual host configured for localhost pointed to C:\www. My CFIDE folder is located in C:\www. If your CFIDE folder is located somewhere else or even outside of your webroot/documentroot, then change the mappings to the settings required for your environment.

  1. Open the httpd.conf file in Notepad. It can be found in the conf folder in the Apache folders. For a default install, it is typically
    C:\Program Files\Apache Software Foundation\Apache2.2\conf
  2. There are a number of commented lines inside the tags. Find where it says: Options, Indexes, FollowSymLinks and add a # in front of it. Then on the next line, make sure there is no # and add: Options Indexes Includes MultiViews FollowSymLinks
  3. Scroll down to find the alias_module. Inside you will see commented out this line: # Alias /webpath /full/filesystem/path. Add a new line without a # like this
    Alias /CFIDE "C:/www/CFIDE"
  4. Scroll down to the Directory tag just below the alias_module tags, and copy the following code:
    <Directory "C:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
    </Directory>
    Paste the code, below that which you just copied, and change the first line to the correct path, and change the next line
    <Directory "C:/www/CFIDE">
    Options Indexes Includes MultiViews FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
    </Directory>

Once completed, restart Apache. Now if you add the following in the URL, following your virtual host path

/CFIDE/Administrator/index.cfm
it should pull up the CF Administrator. Here is an example for a virtual host configured for myAppLocal

If the CF Admin login displays, you have successfully mapped your virtual hosts to the CFIDE folder.

Apache Does Note Populate CGI.PATH_INFO with ColdFusion

I just started using Apache for local ColdFusion 8 development and while this might be well know by most, I recently learned about it and so am making a note of it.

Apps that use CGI.PATH_INFO should be changed to use CGI.SCRIPT_NAME, because Apache does not support CGI.PATH_INFO.

It is also recommended to use CGI.HTTP_HOST rather than CGI.SERVER_NAME, because server_name can be incorrect on multi-homed servers.

Copyright ©2007 JimPickering.com. Some rights reserved. BlogCFC was created by Raymond Camden. This blog is running version 5.1.004.