[CommandBox 4.6.0+00003 ] trouble with setting Aliases

I’m trying to set up command box for a legacy site. Normally when running it through IIS I would set up two virtual directories.

`

“aliases” : {
“/external” : “src/external/public”,
“/resource” : “src/resource”
}

`

But they don’t seem to work, when I manually try to set them up through commandbox commands it doesn’t throw an error, if I try to do the full path “C:\websites\app\src\external\public” it throws a Access not Denied error.

is there something else I have to configure to to get them to work properly?

Full Server.json

`

{
“JVM”:{
“minHeapSize”:“1024”
},
“web”:{
“http”:{
“port”:“8080”
},
“aliases”:{
“/external”:“src/external/public”,
“/resource”:“src/resource”
}
}
}

`

Full server.adobe2018.json

`

{
“name”:“adobe2018”,
“debug”:true,
“web”:{
“host”:“127.0.0.1”,
“webroot”:“src/public”,
“http”:{
“port”:“8080”
},
“welcomeFiles”:“default.cfm”
},
“app”:{
“cfengine”:“adobe@2018”
},
“JVM”:{
“javaVersion”:“openjdk8”
}
}

`

same thing occurs on different cfengines so I’m presuming I misunderstood how aliases work

Looks like relative aliases are relative to the web root, not the server.json file. If you do a --debug start you’ll be able to see some logging when the aliases are created which should show you the full path that’s being used.

Awesome thank you, that resolved my issue.

One other thing to note was that I wasn’t able to get inheritance to work with having a server.json and an engine.json, and maybe I had just misunderstood the documentation but I was thinking that would originally work.

I wasn’t able to get inheritance to work with having a server.json and an engine.json

Sorry, I have no idea what that means. engine.json is not a thing.

maybe I had just misunderstood the documentation

What docs? link?

I wasn’t able to get inheritance to work with having a server.json and an engine.json

Sorry, I have no idea what that means. engine.json is not a thing.

Originally I had a server.json, server-adobe2016.json, server-lucee5.json (the different server engines is what I meant)

maybe I had just misunderstood the documentation

What docs? link?

Got some paths crossed when I was thinking it would always look for a server.json, and if you specified a server-engine.json it would also pull in some arguments from the server.json

Thank you Brad for the assistance

Ahh, so you meant a server-customServername.json file. Yeah, there’s no inheritance there. If you do

start serverConfigFile=server-customServername.json

Then ONLY that file is used.

If you want to have a base file with just some simple things that change between servers, then look into using environment variables