OK, so now that we are moving to localized development it has become necessary to learn how to configure our desktops for running a localized copy of our sites. The trick here is the complexity of our setup. We have multiple sites, sharing the same code base, accessing media from external resources. We also have to setup for multi-instance, to separate our front-end site and our back-end administration. We also need to be setup for one SSL site. Oh yeah, and we have to do it on Apache, since XP pro's version of IIS has some limitations about running multiple domains simultaneously. To top it all off (at least in my case) I also have to run Apache 2.0.59 so that I can also run Subversion, which is not yet compatible with Apache 2.2.
Initial setup of Apache with ColdFusion (7 or 8) is fairly straightforward by following AcidLabs ACME Guide. Follow the instructions for setup carefully, paying attention to the installation options, as it will be very important towards your setup success. In my case I did use the Apache 2.0.59 Win32 SSL Binary (MSI Installer) version. The true fun begins when it's time to 'configure' your server.
First, some basics on your Apache setup. I used the same naming convention for the server name as my machine name: username.companyname.loc. This means that, when I call the URL later on, http://username.companyname.loc, I should be able to see content if I have configured everything correctly. The ColdFusion installer handles the majority of the basic setup with Apache. But I wanted to access my CFIDE from the domain, and I wanted to have that domain (username.companyname.loc) to direct to a specific folder which I use for scratchpad-type-playaround-files. The first thing you must do is setup, within your httpd.conf file, to allow for named Virtual hosts. Find the "Dynamic Shared Object (DSO) Support" area of your Apache configuration file. The LoadModule statements are used to enable, or disable, certain features of the server. In this case, you need to enable the module for Virtual Hosts.
# SGB: 07.09.07 Enable mods for VirtualHosts and SSL
LoadModule vhost_alias_module modules/mod_vhost_alias.so
Next you will need to enable support for NameVirtualHost, and create a virtual host directive for your default administrative server. This is done at the very end of your config file. We'll also add an 'Alias', which is basically a virtual directory, that will point to your CFIDE folder.
# Use name-based virtual hosting.
# Root folder for my scratchpad stuff
DocumentRoot "C:\Documents and Settings\username\My Documents\wwwroot"
# Alias for /CFIDE, which the CF install placed in my Apache webroot.
# This is solely for our dev environment, and would not be a good practice
# within a production environment
Alias /CFIDE "C:/Program Files/Apache Group/Apache2/htdocs/CFIDE"
<Directory "C:/Program Files/Apache Group/Apache2/htdocs/CFIDE">
Allow from all
CustomLog logs/username.companyname.loc-access.log common
This allowed me to place an index.cfm file inside my wwwroot directory, hit it from the browser, http://username.companyname.loc, and get a valid response. It also allows me to hit my ColdFusion administrator, of my default instance, by going to http://username.companyname.loc/CFIDE/Administrator in my browser.