How To Create A Virtual CFIDE Directory Mapping In Apache

Published: {ts '2011-06-04 00:00:00'}
Author: Steven Neiland
Site Url: http://www.neiland.net/article/how-to-create-a-virtual-cfide-directory-mapping-in-apache/

Most ColdFusion installs use the IIS webserver, so creating a common mapping to the CFIDE directory is a straight forward task of using the IIS virtual directory mapping tool.

However if like me you prefer the Apache HTTPD webserver then you do not have the luxury of a gui tool. Fortunately Apache makes this very easy to do, just follow these steps.

Step 1:Ensure Mod_Alias is Installed

First ensure that the mod_alias.so file exists in the apache modules directory. Then open the httpd.conf file and locate the "Loadmodules" section. For slackware users it can be located at "/etc/httpd/httpd.conf". Ensure that the following line exists and is uncommented.

LoadModule alias_module modules/mod_alias.so

Step 2: Set the Options in the Relevant Directory Node in httpd.conf

With the httpd.conf still open locate the "Directory" section corresponding to the website you want to add CFIDE to and ensure that the "Options" directive says: "Indexes Includes MultiViews FollowSymLinks".

--snip-- Options Indexes Includes MultiViews FollowSymLinks --snip--

Step 3: Define the Alias Mapping

Now scroll down to find the alias_module section and add the following line to create the alias.

--snip-- Alias /CFIDE "[path]/[to]/CFIDE" --snip--

Step 4: Restart Apache and Test

To apply the changes simply restart apache and visit http://yourdomain/CFIDE/administrator. If the changes have worked you should see the ColdFusion Administrator login page.

For slackware users use the following command to restart apache.

/etc/rc.d/rc.httpd restart