I am adding "webroot":"my_domain" to server.json b...
# cfml-general
m
I am adding "webroot":"my_domain" to server.json but when I start the commandbox CF server it quits, the server is not loadingup, any work around to add a web root? like in localhost:8500/my-domain ? thanks.
d
did you mean hostname?
What you are saying "my-domain" is just a folder in your app.
in server.json you can do web.host = "my-domain" and that will result in
<http://my-domain>:<some-random-port>
did you figure it out?
@Marco When I first started using commandbox starting the server with these options helped me out:
commandbox> server start --console --trace
That way in the console you can see errors/reasons why it didn't start.
m
thanks for the trace argument, I am still trying to figure it out
d
what do you see in the console logs?
here is an example of a simple server:
Copy code
{
  "name": "My Site",
  "profile": "development",
  "app": {
    "cfengine": "adobe@2021.0.3+329779"
  },
  "cfconfig": {
    "file": "server.cfconfig.json"
  },
  "web": {
    "aliases": {
      "/images": "C:/sites/assets/images"
    },
    "host": "<http://localdev.mysite.com|localdev.mysite.com>",
    "HTTP": {
      "port": 80
    },
    "welcomeFiles": "default.cfm,index.cfm,index.html",
    "GZIPEnable": true,
    "rewrites": {
      "enable": "true"
    }
  },
  "jvm": {
    "minHeapSize": "512",
    "heapSize": "512"
  }
}
this server.json is at the root of the application, and in the terminal I cd into the root of this application and run the
server start --console --trace
command
This will start a site
<http://localdev.mysite.com>
on port 80
m
thanks for the example
d
All options: https://commandbox.ortusbooks.com/embedded-server/server.json?q=server.json to set an an option via commandbox commands:
Copy code
commandbox> server set web.host = '<http://localdev.mysite.com|localdev.mysite.com>'