tracker issue : CF-4203348

select a category, or use search below
(searches all categories and all time range)
Title:

cf_scripts/scripts Virtual Directory Breaks Administrator

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/NotABug

Reporter/Name(from Bugbase): Ruby Zindler / ()

Created: 09/20/2018

Components: Administrator, Administrator Console

Versions: 2016

Failure Type: Incorrectly functioning

Found In Build/Fixed In Build: ColdFusion 2018 Update 1 /

Priority/Frequency: Normal /

Locale/System: English / Win 2012 Server x64

Vote Count: 0

Problem Description:
Changing the Default ScriptSrc Directory to a virtual directory in IIS *also* affects the built-in web server's administrator console. As a result, necessary JS files (jquery.js) cause a 404 within CF Administrator, breaking the site.
Steps to Reproduce:
1. Create a virtual directory in IIS that points to cf_scripts/scripts.
2. Delete the original cf_scripts directory in IIS, originally created by the web connector.
3. Update the Default ScriptSrc Directory with CF Administrator and submit changes.
Actual Result:
Changing the default directory correctly redirects site traffic in IIS for the intended site, but incorrectly points the built-in web server to a physical directory that doesn't exist.
Expected Result:
Change the default script location for the external web server while allowing the built-in web server to reference the actual directory.
Any Workarounds:
1. Copy the cf_scripts/scripts folder and paste into wwwroot.
2. Rename the new directory to match the virtual directory in IIS.


*As of writing, tracker.adobe.com does not list CF 2018 as a selectable version. Filing under CF 2016 as that is the next most recent release.

Attachments:

Comments:

@Ruby  If you are changing the script path in the administrator, you need make the changes in the server.xml  as well which is present inside <cfhome>/runtime/conf/  <Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="false"> <Context path="" docBase="C:\ColdFusion2018\cfusion\wwwroot" workDir="C:\ColdFusion2018\cfusion\runtime\conf\Catalina\localhost\tmp"> <Resources> <PreResources className="org.apache.catalina.webresources.DirResourceSet" base="C:\testRoot\cf_scripts\scripts" webAppMount="/script" /> </Resources> </Context> </Host> In the preresources, base specify the path where the script files are present. If you are trying anything different please elaborate.  
Comment by Dattanand M Bhat
29792 | October 17, 2018 10:57:28 AM GMT
@Ruby  If you are changing the script path in the administrator, you need make the changes in the server.xml  as well which is present inside <cfhome>/runtime/conf/  <Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="false"> <Context path="" docBase="C:\ColdFusion2018\cfusion\wwwroot" workDir="C:\ColdFusion2018\cfusion\runtime\conf\Catalina\localhost\tmp"> <Resources> <PreResources className="org.apache.catalina.webresources.DirResourceSet" base="C:\testRoot\cf_scripts\scripts" webAppMount="/script" /> </Resources> </Context> </Host> In the preresources, base specify the path where the script files are present. If you are trying anything different please elaborate.  
Comment by Dattanand M Bhat
29793 | October 17, 2018 10:57:29 AM GMT
Thank you for your response, Dattanand. I'm having trouble getting this to work for my implementation, with the ColdFusion service either unable to start or CF Administrator unable to load. Admittedly, we stepped from CF11 to 2018, in effect skipping 2016 where the need for this seems to have first started. In the old lockdown guides for CF10 and CF 11, the reference for editing server.xml was limited to Linux installations (apparently CF Admin took care of this under the hood in Windows in that case). As it is I'm heavily inclined to leave my workaround in place. The duplicated and renamed physical folder I created is only used by the Built-in Server and is accessible only from 127.0.0.1. With IIS correctly using a virtual script directory for the exposed site, I am having trouble seeing the need to continue burning my time troubleshooting an XML entry when at most I only need to keep the second script folder in sync whenever there's an update. It's baffling that a long-time setting in CF Admin now requires manual file editing. Any thoughts on this?
Comment by Ruby Zindler
29801 | October 17, 2018 02:41:05 PM GMT
@Ruby please refer to the latest down guide. link -  [http://wwwimages.adobe.com/content/dam/acom/en/products/coldfusion/pdfs/coldfusion-2016-lockdown-guide.pdf] Page# 52 under "To Create a new Alias for /cf_script/scripts in the built in web server". Since ColdFusion administrator uses the built-in web server, you need to add the line i shared in server.xml too for things to work properly. And this not specific to Linux the same needs to be done on Windows as well. Could you please confirm from your side that it works, so that we can go ahead and close this bug.  
Comment by Dattanand M Bhat
29804 | October 19, 2018 10:03:54 AM GMT
Hello again, Dattanand, You are welcome to mark the bug closed, but I could not get your solution to work for me. When I try implementing it, the ColdFusion service is unable to start. I'm sure there's a syntax problem somewhere, but I've spent a few hours trying to find and correct it. Are there any plans for a CF 2018 lockdown guide? It's a little weird using the one from 2016.
Comment by Ruby Zindler
29819 | October 22, 2018 12:09:10 PM GMT
Thanks for confirmation, we will publish the lock-down guide for CF 2018 very shortly.
29833 | October 24, 2018 06:34:22 AM GMT