Defining Sites
Defining sites in CommandBox Multi-Site
❯ start --dryRun
√ | Starting Server
| √ | Configuring site [site1]
| | √ | Setting site [site1] Profile to [production]
| √ | Configuring site [site2]
| | √ | Setting site [site2] Profile to [production]
| √ | Configuring site [site3]
| | √ | Setting site [site3] Profile to [production]Define a "sites" object in server.json
{
"name":"My server",
"web":{
// These settings apply to all sites
"accessLogEnable":"true",
"bindings":{
"HTTP":{
"listen":"80"
}
}
},
"sites":{
"site1":{
"hostAlias":"site1.com",
"webroot":"/path/to/site1"
},
"site2":{
"hostAlias":"site2.com",
"webroot":"/path/to/site2",
// Overrides the default above coming from "web"
"accessLogEnable":"false",
}
}
}Define a siteConfigFiles setting in server.json
siteConfigFiles setting in server.jsonWas this helpful?