Article

Install And Configure ColdFusion MX 6.1 on Windows

Page: 1 2 3

Post-ColdFusion Installation Apache Configuration

Apache requires very little post-installation modification, however this doesn't mean there isn't anything we can't do. I always double-check to make sure the "install" script did what it was supposed to while editing the httpd.conf.

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 be greeted with the wonderful Apache test page! If you see an error, review the steps above to make sure you followed all the Apache installation steps, and check your log files for more detailed errors.

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

  1. Failure #1: Your browser prompts you to save the .cfm file to your computer.
    Resolution: Two things come to mind as quick fixes here. The first is to restart Apache, since it probably hasn't been restarted since you installed ColdFusion. The second is to check your httpd.conf file to make sure the ColdFusion module is being loaded. Locate your httpd.conf file (mine was in C:\Program Files\Apache Group\Apache2\conf), and see if you can't locate this line:

    LoadModule jrun_module "C:/CFusionMX/runtime/lib/wsconfig/1/mod_jrun20.so"

    I ran a search for mod_jrun20.so and got two hits, one of which was a comment.

    If this line exists, it's probably near the very bottom of your httpd.conf file. This isn't a big deal, but to make life easy, cut and paste it to appear as the last entry with your other LoadModule commands, which are located shortly after the "Listen 80" line.

    Once you've got your load module line in the httpd.conf file, check to make sure index.cfm is one of the DirectoryIndex options. Just search the httpd.conf file for this command -- you should see it appended to the end of the list. If you want you can add index.cfml to this list as well.

    Restart Apache and browse to the http://localhost/CFIDE/administrator/index.cfm URL. If everything looks good, skip ahead to the Configuring ColdFusion section of this article. If you're still receiving errors, check your log files and confirm that the CFIDE folder and files are installed inside your webroot directory (C:\Program Files\Apache Group\Apache2\htdocs).

  2. Failure #2: You get a message that the CFIDE folder doesn't exist or that it can't find the file.
    Resolution: it's more than likely that this folder and its files were placed somewhere else, or that you've got Apache looking into a folder that's different from the one into which you told the ColdFusion installer to install the CF Administrator. The first thing to do is to check that the CFIDE folder is in your webroot folder. If it is, check your Apache httpd.conf file to ensure the "DocumentRoot" line reflects the location you gave to the ColdFusion installer to install the CF Administrator. If you have to make any changes to httpd.conf file, be sure to save and restart Apache before you try to visit the URL.
  3. Failure #3: If you've got an error which isn't mentioned in #1 or #2, or you're still having problems, you've probably configured something incorrectly. Double check the steps above to make sure you followed them correctly. If you find you didn't miss or skip anything, I recommend you make a post in the ColdFusion forums here at SitePoint to get help.

Now that Apache is installed and configured, and ColdFusion is installed, it's time to begin the configuration of ColdFusion MX 6.1.

Post-Installation Configuration of ColdFusion MX

You can confirm that you have both Apache and ColdFusion installed and running by browsing to http://localhost/CFIDE/administrator/index.cfm. You should be greeted with a screen similar to this:

1400_postinstall1

Go ahead and type in your ColdFusion Administrator Password. In the next few screens, we'll set up some basic initial configuration and post installation tasks for ColdFusion.

The first screen will let us set up our RDS system. Personally, I'm not a big fan of RDS, especially on a Production server, but I understand that many Dreamweaver users love it. On a development box, I see no problem with it, so I recommend you leave it installed and set your RDS password to match your ColdFusion Administrator password.

1400_postinstall2

If you are doing this on a production server, I strongly recommend you investigate the vulnerabilities of running RDS, and choose a strong password that's nothing like your ColdFusion Administrator password.

Disabling the RDS will not hinder anything you develop, but it will mean that you can't use the Directory Browsing Applets in the ColdFusion Administrator. This is not a big deal if you know the layout of your server, but the applets can be a time and configuration life-saver. Again, choose the option that's best for your development shop and protocols.

Once you've entered your password (twice), click the Next button. This next screen installs the ODBC services. Be patient -- the screen will automatically refresh once the installation is done.

1400_postinstall3

You shouldn't encounter any errors at this point, but if you do post them in SitePoint's ColdFusion forums and get some help before you proceed.

The next screen asks you if you want to install the sample applications with which ColdFusion is bundled.

As the text warns, you shouldn't do this on a production server. However, on a development server, this can be a good thing, especially if you're brand new to ColdFusion, or like to have real world code to reference while building your applications.

I've never installed these sample applications, but I suggest you learn more about them and make your own decision.

After you make your selection, click on the Next button to continue. If you opted not to install the sample applications, wait a few moments while the script processes. You should end up with this screen:

1400_postinstall5

Go ahead and click the OK button. You'll be presented with the ColdFusion Administrator. When you first load up the ColdFusion Administrator, you'll see a screen similar to this:

1400_cfadmin1

This screen is the main landing page for the ColdFusion Administrator. The area outlined in red (only in this article; it's not actually red in the Administrator) is what I call the "Action" area. This is where you'll either "Do" something, like configure a data source, mapping etc., or "Get" information, such as reading your log files or using the Code Analyzer.

The area outlined in yellow (again only for demonstration purposes) is the menu area. If you've used ColdFusion 5, you'll notice that this menu is a bit more compact and cleaner. Also, you'll note that all your "activities" are kept on one page.

For those that aren't familiar with it, ColdFusion 5's Administration menu had 3 buttons along the top that allowed you to change the menu and dive deeper into ColdFusion 5. Some liked this approach; others disliked it. Apparently those who disliked it won out, because we see this new menu in ColdFusion MX (6.x).

Now, I'm going to show you some very basic settings to get you started. For a more in-depth overview of the ColdFusion Administrator, you'll have to wait for my next article, where we'll go through the ColdFusion Administrator bit by bit.

Simple Settings to Start

One of the more popular areas of the ColdFusion Administrator is the Data Source area. It is in here that you set up and configure your data sources for use in your ColdFusion programming.

To get started, click on the "Data Source" link in the left-hand menu. You should see a screen that looks like this:

1400_simplesettings1

There are two areas of interest here. The first is the Add New Data Source box, which is where you'll add new data sources to your ColdFusion server. The second is Connected Data Sources, which lists all data sources currently set up and configured on this server.

Lets start by creating a data source to a MS SQL server (the following screens will be very similar for other data sources).

First, we need to type in a Date Source Name for this connection. For this test, I'll call it TestConnection1. We then select our drive from the Driver drop down menu, and click the Add button in the Add New Data Source area.

Once you fill in the Data Source Name, select a Driver and click the Add button. You'll be presented with the following screen.

1400_simplesettings2

On this screen, type in the name of your Database, the name of the Server (fully qualified domain name; IP address or network name), the Port on which the server is running, the username and password for connecting to this database, and a short description.

You can leave all these blank, but that is, of course, pointless. Some people do prefer only to enter the database name and server, and leave the username and password blank; these then have to be passed in via your cfquery tag. Unless you have a reason to this, I recommend you fill in this form as completely as possible, so that, when it comes time to code your application, all you have to remember is the Data Source Name.

Once you've completed the form, click the Submit button. ColdFusion will try to establish a connection to this data source to ensure that it exists and can be reached with the given values. Any connection or authentication errors will be reported back so that you can resolve the issue at hand. Also note that at any time you can click on the "Verify All Connections" button in the main Data Sources page to have ColdFusion check all the current configured data sources.

Besides data sources, one other area that you might need to jump into sooner, rather than later, is Mappings. Locate the Mappings link in the menu area and click on it to get this screen.

1400_simplesettings3

Mappings are like virtual directories in IIS, or short-cuts in windows. When you create a mapping, it tells the ColdFusion server to "treat this directory reference as xyz". Mappings allow you to avoid the relative dot nightmare when traversing outside your root folder. Let me try to illustrate this for you.

Let's say your webroot is at c:\webroot\www\mysite1 and you want to create an includes directory, but you don't want to reference it as ../../includes. With a mapping, you will be able to tell ColdFusion that any reference to /includes = ../../includes.

To accomplish this, put /includes in the Logical Path text field and the c:\webroot\includes into the Directory Path text field. Now, whenever you reference /includes in your code, ColdFusion will automatically know to reference files in c:\webroot\includes.

Mappings are extremely useful when you have multiple sites on a box. You could create a mapping for each site (mysite1, mysite2, mysite3) and, instead of referencing each as c:\webroot\www\mysite1 or c:\webroot\www\mysite2, you could simply reference it as /mysite1 or /mysite2.

Conclusion

That's it for this tutorial! Feel free to spread your wings a bit and poke around other areas of the ColdFusion Administrator, and keep an eye out for my next article, where we'll go through each item from top to bottom.

If you liked this article, share the love:
Print-Friendly Version Suggest an Article

Sponsored Links

Rate This Article

  • 1
    Poor
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
    Great

Comment on This Article

Have something to say?

Post A Comment

You need to be a member of the SitePoint Forums to comment on this post. Sign Up

Already a member? Post using your SitePoint Forums account: