Setting the physical file path of an application with ColdFusion
Hopefully this tip will help someone down the road too, or maybe someone can enlighten me as to the "right" way to code for the physical file path of an application.
I was setting the following code in the OnApplicationStart() method to set the application's physical file path (http://mydomain.com/myApplication):
Well, it does...MOST of the time....I still haven't gotten to the bottom of it, but sometimes the rootpath would get set to nested directories (C:\inetpub\wwwroot\mydomain\myApplication\middle\). I can only assume that the application would sometimes reinit when it was in the middle of processing something in the "middle" directory.
Long story short, I'm about to deploy this code fix to (hopefully) resolve the problem:
Change the default port on the built in ColdFusion Webserver
More syntax I never remember
Changing the Port Number for ColdFusion MX 6.1
If using the Macromedia standalone web server with ColdFusion MX 6.1, you can also change the port from 8500 to 80 or any other available port.
Simply open the install directory:\CFusionMX\runtime\servers\default\SERVER-INF\jrun.xmlfile and search for<attribute name="port">8500</attribute>, which is near the bottom of the document. Change the port number from 8500 to the available port you wish to use, such as port 80, and save this file. Stop and restart the ColdFusion
Changing the web root for ColdFusion's built in webserver
I never remember this file path/syntax when setting up a new machine (instructions courtesy of Adobe support)
1. Make a backup copy of C:\ColdFusion8\wwwroot\WEB-INF\jrun-web.xml, and then open the original version of the jrun-web.xml file.
2. Edit the system-path attribute to change to the new web root directory:
<resource-path>/*</resource-path>
<system-path>c:/inetpub/wwwroot/</system-path>
</virtual-mapping>
3. Save the file.
4. You can now move the CFIDE and cfdocs directory to the new web document root. These directories contain the files for the ColdFusion Administrator, the ColdFusion documentation, and the ColdFusion example code. Caution: Do not move the WEB-INF directory. It must stay under the cf_root\wwwroot directory.
5. Restart the ColdFusion server.

