Highlighted

ColdFusion 2018 changing docBase renders administrator page grayed out with a search bar.

Explorer ,
Sep 08, 2020

Copy link to clipboard

Copied

Good morning,

 

      I have a ColdFusion 2018 install on a Cent OS 7 server.  I have changed the document base via the server.xml file, and added the PreResources base for CFIDE and WEB-INF:

 

<Context path="" docBase="/var/www/vhosts" WorkDir="/opt/coldfusion2018/cfusion/runtime/conf/Catalina/localhost/tmp" >
<Resources>
<PreResources base="/opt/coldfusion2018/cfusion/wwwroot/CFIDE" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/CFIDE"/>
<PreResources base="/opt/coldfusion2018/cfusion/wwwroot/WEB-INF" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/WEB-INF"/>
</Resources>
</Context>

 

After saving the sever.xml file, restarting coldfusion server, I am able to see my local web sites just fine on the browser, but the admin page is grayed out with a search bar. 

Screen Shot 2020-09-08 at 9.18.03 AM.png

I have done some initial research, and have tried editing the neo-runtime.xml file for the CFFormScriptScrc, adding the absolute path to the /cf_scripts/scripts/ folder, and restart coldfusion server but still no luck on the admin page:. 

<var name='CFFormScriptSrc'><string>/opt/coldfusion2018/cfusion/wwwroot/cf_scripts/scripts/</string></var>

 

When I go back to my server.xml file and comment out the Context block, restart, I can get to the admin page just fine, but of course can't access my local sites due to them being in the /var/www/vhosts/ folder.  Any insight or advice on what to look for next would be much appreciated.

 

Thanks,

 

Daniel

 

 

Views

13

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

ColdFusion 2018 changing docBase renders administrator page grayed out with a search bar.

Explorer ,
Sep 08, 2020

Copy link to clipboard

Copied

Good morning,

 

      I have a ColdFusion 2018 install on a Cent OS 7 server.  I have changed the document base via the server.xml file, and added the PreResources base for CFIDE and WEB-INF:

 

<Context path="" docBase="/var/www/vhosts" WorkDir="/opt/coldfusion2018/cfusion/runtime/conf/Catalina/localhost/tmp" >
<Resources>
<PreResources base="/opt/coldfusion2018/cfusion/wwwroot/CFIDE" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/CFIDE"/>
<PreResources base="/opt/coldfusion2018/cfusion/wwwroot/WEB-INF" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/WEB-INF"/>
</Resources>
</Context>

 

After saving the sever.xml file, restarting coldfusion server, I am able to see my local web sites just fine on the browser, but the admin page is grayed out with a search bar. 

Screen Shot 2020-09-08 at 9.18.03 AM.png

I have done some initial research, and have tried editing the neo-runtime.xml file for the CFFormScriptScrc, adding the absolute path to the /cf_scripts/scripts/ folder, and restart coldfusion server but still no luck on the admin page:. 

<var name='CFFormScriptSrc'><string>/opt/coldfusion2018/cfusion/wwwroot/cf_scripts/scripts/</string></var>

 

When I go back to my server.xml file and comment out the Context block, restart, I can get to the admin page just fine, but of course can't access my local sites due to them being in the /var/www/vhosts/ folder.  Any insight or advice on what to look for next would be much appreciated.

 

Thanks,

 

Daniel

 

 

Views

14

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Sep 08, 2020 0
Adobe Community Professional ,
Sep 09, 2020

Copy link to clipboard

Copied

Daniel, there are a few things to consider.

  • First, as for that cfformscriptsrc value you set, it should NOT be an absolute path. It should be a webroot relative path (or an alias). If set as a webroot relative path, it would be pointing to a folder witin that cfusion/wwwroot, so just saying /cf_scripts/scripts would suffice, and that is in fact the default
  • Most people get in trouble when they change that (which as you may know, you can do in the CF Admin on the first "settings" page, but I relize you could not do that because you could not get the Admin to work at all 🙂
  • And indeed, if one DOES change that value to anything ELSE than that default, then even if they correct their web server (IIS or Apache) to have a new virtual directory or alias of that name (which should then point to the absolute path for that scripts folder), they often find that their CF Admin fails to work--whether in part (like the Updates page tabs not working) or perhaps in whole (as you experienced).
  • The problem is that they need to ALSO change the CF built-in web server (which is used for the Admin by default since CF2016, and optionally before that). It's actually the Tomcat web server, and in fact that is what you were perhaps trying to do when modifying the preresources elements in the server.xml. Where did you get instructions to do what you were doing?
  • I will say that Pete Freitag did a post some years ago which covers both newer and older CF (Tomcat) versions. See https://www.petefreitag.com/item/867.cfm. It focuses on the change needed when one wants to define an "alias" in that web server, such as is needed if you do make changes to that CF Admin "default script src" path.
  • But we see here that you were having it define the location of the CFIDE folder...and note that is NOT where the scripts folder is, for CF2016 and above. Instead, it's not in the cf_scripts folder, as a sibling to that. So instead, as Pete's post suggests, create an alias (a preresource) that maps that scripts path (in the admin, such as "cfscripts") as a webappmount) that pooints to the real cf_scripts/scripts folder. You were close. 🙂 Again, see Pete's post for more.
  • Finally, I should note that in all such cases, you can really help yourself in troubleshooting such situations when you can SEE what is amiss, by viewing any browsers "dev tools" (right click on white space in the browser and choose something like "inspect"), where the tool's "network" tab would show (on a refresh of the Admin page) that there were many 404's, and you'd see how they are trying to call back to the server. That may help you see where your mistake is, at least from the client side. 

 

Let us know how you get on.

/Charlie (server troubleshooter, carehart.org)

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 09, 2020 0