Server Start Not Loading CF Admin Setting From JSON File

I used cfConfig to export server settings from an existing CF2016 installation. Upon inspecting the resultant JSON file, it appears that everything exported as expected. All my datasources and mappings etc are there.

However, when I do a server start via commandBox, none of the settings show up in the cf administrator. Below is my start command: ( I’ve itemized them for easier reading. They are normally all in-line )

server start name=mikeletson
cfengine=adobe@2016
welcomeFiles=index.cfm
directory=‘C:/inetpub/wwwroot/mikeletson’
host=www.mikeletson.local
serverConfigFile=‘C:\inetpub\wwwroot.cfconfig.json’ ( I’ve tried referencing my JSON file outside of the root, to no avail so I’m trying this as well )
openbrowser=true
debug=true

What do I need to do in order for datasource and mapping settings to load upon server start?

Thank You

Hi, it seems you’ve confused two different JSON files. The serverConfigFile is the server.json file that contains the basic settings for your web server such as port, host, openbrowser, cfengine, etc.

https://commandbox.ortusbooks.com/embedded-server/configuring-your-server

In fact, I would recommend setting all of those parameters into your server.json file and not passing them every time to the start command. if the server.json file is in your web root, you can leave out the directory all together and set everything like so. Note, your welcome file and open browser settings are already the default setting so you should be able to omit those as well.

server set web.host=www.mikeletson.local
server set app.cfengine=adobe@2016
start --debug

Now, in regards to the the .cfconfig.json file, this is totally separate from the server.json and is used exclusively bu the CFConfig module. So long as the name of the file is exactly “.cfconfig.json” (note the leading period) and it exists in your web root then you don’t need to do anything to load it so long as the commandbox-cfconfig module is installed. You will see the output “Config transferred” in the output of the server if it fires. If you want to store the cfconfig json file outside the web root, use the cfconfigFile property in your server.json to point to it as documented here:

https://cfconfig.ortusbooks.com/using-the-cli/json-file-storage

Thanks!

Thank you,

Still not working. I’ve attached my server.json my .cfconfig.json files for your review. Both live at c:\inetpub\wwwroot. I start command is: server start name=mikeletson serverConfigFile=‘C:\inetpub\wwwroot\server.json’

I am not able from the documentation to understand exactly how to do this. Thanks for your help!

Mike

MyJSONFiles.zip (290 Bytes)

Also, I looked at the debug output and it does say “Config transferred!”. Attached is the debug output.

server_start_log.txt (12.5 KB)

Solved. The online documentation as well as your email below uses the term “web root” which I was construing to be c:\inetpub\wwwroot. In truth however, it is my domain root folder: c:\inetpub\wwwroot\mikeletson.

Once I put my JSON files in there, wa-lah. Everthing works fine. You may disregard my previous emails.

Thank you,