2
votes

I want to get CF9 with IIS 7 setup locally to run with multiple domains. I have read this one but it doesn't say anything about the actual setup. Need help with multiple URL setup on local CF9/Jrun install

I setup IIS so that I can start 127.0.0.1/domain1/index.cfm The page loads properly

but all subsequent links fail with

Could not find the included template: /_/definesession.cfm

But I see the file when typing in file:///C:/InetPub/wwwroot/domain1/_/DefineSession.cfm The files are there but apparently the server is only reading the directory correctly

If I test http://127.0.0.1/domain1/_/BrowserDetect.cfm with no includes just a self contained file it executes properly.

The path in IIS is set to C:\InetPub\wwwroot\domain1 The bindings hostname is just domain1 no TLD

Also the second instance 127.0.0.1/domain2/index.cfm is working correctly. And here as well including subdirectories is failing.

ADDITIONAL NOTES: (added 1/3/12)

I guess it has to do with the CF mapping. I now moved the code to c:\coldfusion9\wwwroot\domain1_... and it sort of works.

In other words I start the program here: C:\inetpub\wwwroot\domain1\index.cfm Inside that index is for instance

But it executes the file located here: c:\coldfusion9\wwwroot\domain1_\definesession.cfm Just couldn't find anything in the web about mapping a local CF9 to that situation. Any idea??? –

2
"But I see the file when typing in file:///C:/InetPub/wwwroot/domain1/_/DefineSession.cfm The files are there but apparently the server is only reading the directory correctly" -- this is very suspect phrase. What do you mean by this? Where are you typing this? In the cf template via cfinclude? Or perhaps are your referring to what you are typing into location bar of your web-browser? Be very specific here--your question details are stepping over each other in terminology, making it difficult to assess the problem. - Shawn Holmes
Have you checked to make sure the /_/ folder has the necessary permissions to allow IIS to read from it? Since the domain1 and domain2 folders are working, I'd compare the permissions on the subfolder to the permissions on the main folder. - Jake Feasel
Shawn - yes, I added the line as is into the Browser. Jake - yes, IIS has access. When I installed the "internal webserver" everything worked well. But with IIS and multiple URLs / Domains I have that issue. - Axel Schultze
What happens when you browse to 127.0.0.1/domain1/_/definesession.cfm? - Yisroel
That actually works. I added a mapping with "/" pointing to "C:\InetPub\wwwroot\domain1\" in CF Admin and that made most of the app work. But now even more bizar not all files get included properly. Also images are seeked at 127.0.0.1/_/assets/images... just ignoring the /domain1/ part. Also all this doesn't make sense as I want to run this on multiple domains and can't add a / mapping for multiple sites. Obviously did all the service reboots etc in between. Close to giving up - Axel Schultze

2 Answers

1
votes

You might have a ColdFusion mapping for "/" that needs to be adjusted.

1
votes

OK I fixed it. There were multiple issues:

  1. For whatever reason there were some issues with IIS and I had to reinstall it.
  2. I had to make sure 9.0.1 was installed
  3. I had to run Webserver Configuration Tool multiple times to actually get the Handler Mappings in order.
  4. http://127.0.0.1/domain1/ was wrong - it must be http://domain1/ etc.
  5. I forgot to add the domains to the host file on the machine - stupid me
  6. I had to redesign my mapping to avoid overlaps between domains (i.e. mapping CFCs to /_/cfc/ on all domains needed to have different mapping names.

Now I have several different domains on my local machine and they work just fine.