CommandBox allows you full control over the servers you start. This includes the port and host, custom JVM args, URL rewriting, web aliases, custom error pages, and custom welcome files.
Configuration can be set at several different levels:
- Passed as parameters to the
- Stored in a
server.jsonfile for that server
- Global defaults in the
- Internal defaults from the
Settings will be used in that order. Also, any parameters passed to the
start command will automatically be saved to your
server.json file unless you pass the
A lot of settings used to start a server involve file paths. Paths starting with a drive letter like
C:/, a UNC network path like
\\, or a leading slash like
/ are considered absolute paths and will not be expanded. Try to avoid absolute paths if you want to make your server config portable.
Paths that start with a file/folder name like
../../lib/my.jar are relative and the root folder that they are relative to depends on where there are specified.
- If the path is passed as a parameter to the start command, the path is relative to the current working directory
- If the path is in the
server.jsonfile, it is relative to the folder containing the JSON file. (Remember the
server.jsondoesn't have to be in the web root!)
- If the path is in a global
server.defaultsconfig setting, it is relative to the web root of the server.