Windows 2000 IIS/ColdFusion MX/virtual servers problem

vortix

Senior member
Jun 13, 2001
609
0
0
I have a brand new installation of Windows 2000 Server with ColdFusion MX (and all the latest service packs/updates for Win2k and CFMX). I also installed PHP, MySQL, and Perl...which all work fine. This is all installed on a 2.4GHz Dell server w/ 1GB of RAM and a 72GB SCSI HDD. I have a few domain names (and subdomains) that I would like to host on this server. However, when I set up the virtual web servers in IIS to do this, and browse to a domain....it tries to use an index.cfm in a completely different directory!!

Example:
Say I have 2 domain names (to make things easier to understand). domain_1.com and domain_2.com. I set up IIS to use d:\websites\domain_1 for the home directory for domain_1.com, and d:\websites\domain_2 for the home directory for domain_2.com. Now, when I browse to domain_2.com in a browser, it tries to use the index.cfm file from the domain_1 folder. However, I can view the other files/folders that are in the domain_2 folder just fine if I type them in manually - it is *only* the index.cfm that the web server is pulling from the wrong location. Why in the world would it do this?? I asked our Windows NT/2000 admin at work about this, and he said he's never had this happen.

I originally had this problem happen, and reformatted and reinstalled everything and it still happens. I am using legitimate copies of all the software I installed, too.

Has anyone ever seen this happen before? Could it possibly be a DNS issue, or is it a problem with IIS, or ColdFusion?? As far as DNS goes, I have my DNS hosted by an ISP, and *.domain_1.com and *.domain_2.com both point to my IP address.
 

Poontos

Platinum Member
Mar 9, 2000
2,799
0
0
What is set, from top to bottom, as the default document in IIS for both websites? Have you tested this outside of your LAN?
 

serialb

Diamond Member
Mar 20, 2000
3,107
7
81
What if you browse for "domain_1.com"? Does it show up the correct index.cfm from site 1?
 

vortix

Senior member
Jun 13, 2001
609
0
0
Originally posted by: Poontos
What is set, from top to bottom, as the default document in IIS for both websites? Have you tested this outside of your LAN? The same thing happens when I try to browse my sites from work.
The default document list for all the websites goes like this, in this order:
index.cfm
index.php
index.htm
index.html
Default.htm
Default.asp
index.asp
Default.aspx

Originally posted by: serialb
What if you browse for "domain_1.com"? Does it show up the correct index.cfm from site 1?
Yes, it shows the correct index.cfm for domain_1.com.
 

vortix

Senior member
Jun 13, 2001
609
0
0
One more thing I noticed, which makes it seem to be some sort of caching issue or something with ColdFusion maybe??

This morning (after not using my computer all night), I browsed to domain_2.com *first*. After that, I tried browsing to domain_1.com, and it continued to display the index.cfm file from domain_2.com. I think ColdFusion MX "compiles" its' .cfm files, and sort of caches that info after running it the first time. Is it possible that ColdFusion MX is somehow serving the same index.cfm for all the websites that are set up??

We use ColdFusion 5 at work (on NT/2000 servers), and this has never happened there. Also, we have some new Sun UNIX machines running ColdFusion MX, and so far they haven't had any problems with those.
 

vortix

Senior member
Jun 13, 2001
609
0
0
OK I finally figured it out!

From the ColdFusion MX release notes:

Web servers using ColdFusion MX that use multiple host names with different document roots ("multihomed" servers) must change the cacheRealPath option of the ProxyService to false. (To do so, open the jrun.xml file for editing, located in the \servers\default\SERVER-INF directory (by default, C:\CFusionMX\servers\default\SERVER-INF\jrun.xml). The cacheRealPath attribute is nested in the XML <service> element with name="ProxyService".) Otherwise, if two sites have a script with the same name relative to their web roots (for example, /index.cfm), the web server might incorrectly render the scripts. This setting might cause slower performance; this is why the option is set to true by default.

Edit cf_root/runtime/servers/default/SERVER-INF/jrun.xml and change the value of the following option from true to false.
<!-- set this to false for multi-hosted sites -->
<attribute name="cacheRealPath">true</attribute>


I suppose that's what I get for not reading the release notes :)