Quantcast
Channel: Adobe Community : Unanswered Discussions - ColdFusion
Viewing all articles
Browse latest Browse all 5794

CF2016 - Alias for /cf_scripts/scripts in the Built-In Web Server

$
0
0

I'm following the lockdown guide here:

http://wwwimages.adobe.com/content/dam/acom/en/products/coldfusion/pdfs/coldfusion-2016-lo ckdown-guide.pdf

 

The guide suggests moving the /cf_scripts/scripts directory, so I did.

The guide also suggests using only the built-in web server for accessing ColdFusion Administrator, so that's how I have it set up.

The guide also states that you should create an alias for the moved directory in the built-in web server.  See page 58 of the PDF.

If you plan on using the built-in web server to access ColdFusion administrator you may need to create an alias for /cf_scripts/scripts if you changed the Default Script Src setting in ColdFusion administrator.

To Create a new Alias for /cf_scripts/scripts in the built-in web server

If you plan to use the built-in web server for accessing ColdFusion administrator then you must also add an alias by adding a Context tag inside the Host tag of server.xml located: /opt/cf11/cfusion/runtime/conf/server.xml

<Context path="/"

docBase="/opt/cf11/cfusion/wwwroot"

Workie="/opt/cf11/fusion/runtime/cone/Catalina/localhost/tamp"

aliases="/coscripts=/opt/cf11/fusion/wwwroot/CFIDE/scripts" />

Restart ColdFusion, then test by visiting /cfscripts/cfform.js on your builtin server.

 

There are a ton of typos in this (Workie vs WorDir, cone vs conf, tamp vs tmp, coscripts vs cfscripts, etc.

This also appears to be referencing the cf11 paths (CFIDE/scripts vs cf_scripts/scripts, and /cfscripts/cfform.js vs cf_scripts/scripts/cfform.js).

 

Further, coldfusion-error.log notes the following:

WARNING: A context path must either be an empty string or start with a '/' and do not end with a '/'. The path [/] does not meet these criteria and has been changed to []

WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'aliases' to '/cf_scripts/scripts=/cf_scripts/test_scripts' did not find a matching property.

 

The first line isn't an issue, but the second line is.  aliases isn't a valid property of context.

The server.xml file has an example, and it's as follows:

<Context path="" docBase="<cf_home>/wwwroot" WorkDir="<cf_home>/runtime/conf/Catalina/localhost/tmp" >

<Resources>

    <PreResources base="docBase1" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/aliasPath1"/>

    <PreResources base="docBase2" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/aliasPath2"/>

  </Resources>

</Context>

 

This aligns with the Apache docs.

 

I have CF installed on Windows, at F:\CF_2016\ .  This is what I've done to alias the scripts directory (renamed to test_scripts for testing) for the built-in web server:

<Context path="/" docBase="F:/CF_2016/cfusion/wwwroot" WorkDir="F:/CF_2016/cfusion/runtime/conf/Catalina/localhost/tmp">

  <Resources>

    <PreResources base="F:/CF_2016/cfusion/wwwroot/cf_scripts/test_scripts" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/cf_scripts/scripts"/>

  </Resources>

</Context>

 

It seems to work.  Is this correct? Should it be aliased as /scripts or /cfscripts instead of /cf_scripts/scripts ?

 

Why exactly do I need to alias this for the administrator?

 

Thanks


Viewing all articles
Browse latest Browse all 5794

Trending Articles