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.
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
Daniel, there are a few things to consider.
Copy link to clipboard
Copied
Daniel, there are a few things to consider.
Let us know how you get on.
Copy link to clipboard
Copied
Daniel, how did things turn out here?
Copy link to clipboard
Copied
Hi Charlie,
Thank you for the information you provided, it greatly helped me fix the issue. As you pointed out, I was missing a PreResource for the cf_scripts folder. I added it to the Resources block in the server.xml file, so my Context block now looks like the following:
<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"/>
<PreResources base="/opt/coldfusion2018/cfusion/wwwroot/cf_scripts" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/cf_scripts" />
</Resources>
</Context>
After adding the cf_scrips webAppMount, I restarted the coldfusion server and was able to navigate to the admin page just fine. One more question regarding the Resources block in the server.xml file, would I be able to create a PreResource alias to a folder that contains my Highcharts, and ckeditor binaries that I can use in my web applications, or would I create that somewhere else? For example, on our current web hosting companies web server, which is a windows server 2008 box, I have virtual directories that link up to a folder that holds these binaries on each one of our IIS web sites.
Thanks,
Daniel
Copy link to clipboard
Copied
Hi Charlie,
Thank you for the input, it turns out I added a PreResources for the cf_scripts directory, with webAppMount="cf_scripts", and that did the trick.
-Daniel
-Daniel