Whatterz


Configuring ColdFusion 8 with Apache

by Simon. Average Reading Time: about 2 minutes.

After installing ColdFusion 8 and Apache successfully you may still see an “HTTP 500 Internal Server Error” when navigating to a ColdFusion page. All is not lost, you simply need to configure, or check the configuration of Apache.

Apache requires very little post installation modification, but it is always good practice to check the httpd.conf file to ensure that the ColdFusion “install” scripts did what they were supposed to do.

If you haven’t confirmed that Apache is running, open your browser and point it to http://localhost/ (unless you specified a real URL during installation). You should see the Apache test page. If you see an error, review the Apache installation steps to make sure you followed all the steps correctly, and/or check your log files for more detailed errors.

Now we know Apache is running, but how about ColdFusion? Point your browser to the ColdFusion Administrator found commonly at http://localhost/CFIDE/administrator/index.cfm and see what happens. One of three possible failures could occur:

  1. Your browser prompts you to save the .cfm file to your computer. There a couple of possible resolutions to this. Firstly restart the Apache service. If this does not resolve the issue you will need to check the httpd.conf file to ensure that the ColdFusion module is being loaded. The file can typically be found in the C:\Program Files\Apache Software Foundation\Apache2.2\conf\ directory.
    Make sure that the DirectoryIndex has a reference to the index.cfm file (i.e. the default file):Apache dir_module DeclarationEnsure that the LoadModule jrun_module "C:/ColdFusion8/runtime/lib/wsconfig/1/mod_jrun22.so" is also present:

    Apache JRun Settings

    If you need to edit this file, restart the Apache service after you have saved the changes.

  2. You get a message that the CFIDE folder cannot be found. This is more likely to be a problem with where you placed the ColdFusion application during install. The default location is in the Apache directory (C:\Program Files\Apache Software Foundation\Apache2.2\htdocs), so check in the http.conf file to ensure the DocumentRoot is pointing correctly. Alternatively, copy this folder to your localhost webroot (e.g. C:\WebRoot) ensuring that the DocumentRoot points to your webroot (see the yellow box in the second screen-shot).
  3. You get another message which probably means that you need to reinstall ColdFusion, and/or Apache!

And that is it, you can start using ColdFusion and developing applications.

This article has been tagged

, , , , , , , , , , , , , , ,

Other articles I recommend

Configuring Your First Local Apache Website

Apache is controlled by a series of configuration files but the one we will be dealing with here is httpd.conf. This file contains instructions on how Apache should run. Several companies offer GUI-based Apache front-ends, but it’s easier to edit the configuration files by hand.

Configuring PHP with Apache on Windows Vista

Installing PHP with Apache on Windows Vista is a relatively simple task until you try an configure the settings in php.ini. Problems can occur and stem from the fact that when you install PHP and edit the php.ini file, you need to not only be logged in as Administrator, but run the installer and Notepad text editor as Administrator. The php.ini file also needs to be located in the Windows directory.

Setting up PHP on Mac OSX 10.6 (Snow Leopard)

Since Apple launched Mac OS X 10.5 (Leopard), PHP has been installed by default, albeit disabled. Here is a quick run through of what you need to do to get it up and running.

  • You may also find the steps illustrated here really helpful with setting up Apache:

    http://blog.cutterscrossing.com/index.cfm/2007/7/23/Local-Development-Setup-Pt-1-Apache-and-ColdFusion-7-or-8

    Also something to consider while setting up Apache (for performance) is to setup mod_deflate and setting “FileETag none” as displayed here.

  • RJT

    OMG THANK YOU! I’ve been fustrated by my browser trying to download the cfm file for ages! Your entry helped me solve it! Thank you!

  • Sinuy

    hi
    the C:/ColdFusion8/runtime/lib/wsconfig/1/mod_jrun22.so file is not there.
    reinstall cf?

  • Thanks! This totally did the trick. I was a tiny bit confused about the screenshot where the virtual host is highlighted in yell. My httpd.conf did not have that but seems to work (under localhost but not 127.0.0.1) regardless.

  • Jerald Thinakaran

    This information was very helpful to me. I had installed Apache after CF and failed to add jrun settings in the conf file. Thanks for helping me resolve the issue

    – Jerry