问题
I'm setting up a new server (CF10 W2K8) going by Pete Freitag's new CF10 lockdown guide. I have a test site installed and if I bring up www.mydomain.com it loads the default document (index.cfm) just fine. However, if I try www.mydomain.com/index.cfm (or any other specific .cfm page), I get a 404 not found.
IIS logs do record a 404 error. If I create a .htm/.html page it comes up fine.
回答1:
I had this problem as well. Running on Windows Server 2008 R2.
I found some threads that suggested that I re-run the "Web Server Configuration Tool" that is installed with CF 10 ({cfroot}\cfusion\runtime\bin\wsconfig.exe).
I tried several things including "Add..." using the name of the server (instead of localhost). Then when I removed it (connections using the name of the server), I could see the IIS commands getting executed to remove all of the connection settings. I also removed the localhost connection. However, using "Add..." to attempt to add localhost back never worked.
So, for me, this tool only worked for removing the cfm/IIS settings that allowed CF to work. My next step was going to be a reinstall of CF 10. However, I found a link to this page:
http://helpx.adobe.com/coldfusion/kb/coldfusion10-iis-manual-connector-configuration.html
I followed the instructions on that page with a few exceptions. I didn't need to follow steps #1 & #2. The file (isapi_redirect.dll) was still there. Steps #3 - #5 were verified (the files existed and had the correct information in them). Everything worked after I finished the steps, except document root documents (http://website.com/). All I had to do was add index.cfm as a server-wide "Default Document". Adobe forgot that step in their instructions.
I don't know why the "Web Server Configuration Tool" failed to install on my server. I even tried running it "Run as administrator" with no success.
I did have to add the virtual directories (CFIDE & jakarta) to all the sites on the server as well.
You can use these handy command-line snippets to speed up that process if you have multiple sites to manage:
rem add cfide virtual directory (CF 10):
%systemroot%\System32\inetsrv\appcmd add vdir /app.name:"site.com/" /path:/CFIDE /physicalPath:"{cfroot}\cfusion\wwwroot\CFIDE"
rem add jakarta virtual directory (CF 10):
%systemroot%\System32\inetsrv\appcmd add vdir /app.name:"site.com/" /path:/jakarta /physicalPath:"{cfroot}\config\wsconfig\1"
Just replace the "site.com" and {cfroot} values to work with your server.
回答2:
When setting up additional sites you must create a virtual directory called jakarta that is mapped to the /config/wsconfig/1 folder
回答3:
Sorry - forgot to mark this closed. I reformatted and reinstalled everything per the CF10 lockdown guide and it worked that time.
I know one problem I had was mapping a virtual 'jakarta' directory in IIS, but I never came up with a specific solution for the domain.com/index.cfm issue.
来源:https://stackoverflow.com/questions/13791113/coldfusion-10-on-windows-2k8-com-loads-ok-but-com-index-cfm-gives-a-404