I was able to fix this by going into the following file and updating some code:
I uncommented this line of code and added the web root of my choice;
<Context path="/" docBase="<cf_home>\wwwroot" WorkDir="<cf_home>\runtime\conf\Catalina\localhost\tmp" ></Context>
This works great for just one of my websites. I can change the root here, and restart the server, and ColdFusion will point to the new root. However, what I really want to do is allow ColdFusion to have not just one virtual directory, but several. This way I won't have to change this code every time and restart the server.
If you're running on Windows, you can use IIS to host multiple websites, and you can either connect ColdFusion to each website individually or to all websites globally.
As Carl has pointed out, it's not the CF server that actually does the virtual hosting, it's the web server that you're using.
You can run IIS or Apache on Windows. I'm running an Ubuntu/Windows virtual development network, at home (two Ubuntu VM servers and a Windows VM server), I'm using Apache to create the virtual hosts, and I've changed the hosts file on the host system so that fake-FQDNs all point to the same IP address of my Apache server and let Apache do the work.
So, when I point a browser of the host system to "dev.rrp.com", Apache processes /home/rrp/public_html/root documents. When I point to "dev.nekojima.org", Apache processes /home/nekojima/public_html/root documents.
I'm not sure how to do it in IIS (I've never liked Microsoft), but I'm sure it's the same principle.
Yes, IIS is similar. I usually create a root folder on my local hard drive for all my websites (like "C:\webdev") and put each distinct website in a subfolder under that. Alternatively, you can put put your websites inside C:\inetpub (the default IIS website will point to C:\inetpub\webroot). So your sites could be stored as C:\inetpub\site1, C:\inetpub\site2, etc. Then, in IIS Manager, you can create a separate website for each of those sites. As WolfShade mentioned, you can use a different hostname for each site (you set this in the Bindings section of each web site). You can then modify your local hosts config file (C:\Windows\System32\drivers\etc\hosts to have an entry for each of those hostnames, all pointing to 127.0.0.1.
Thanks for the great info.
I'm wondering if I'll need to re-install CF in order to connect it to IIS.
No, just run the Web Server Configuration tool. It's in the ColdFusion program group under the Start menu.