Having read the CommandBox docs, and seeing about ...
# box-products
p
Having read the CommandBox docs, and seeing about binding a server to a specific host:port combo - is it possible to have two host names handled by the same server? In Apache, you can assign several hostnames to a specific Virtual host. Wondering if that’s possible with the CB servers…
b
@Peter Hoopes CommandBox really only cares about the IP it's bound to. I'm not sure if your intentions are for local dev or production, but if you have more than one domain in DNS or hostname in your local hosts file, CommandBox will happily serve up all traffic that comes its way
Now, if you are wanting to have two domains with two different web roots, then you'd need to look into our ModCFML support
p
Thanks, @bdw429s - this is for a production machine. I’ll take a look at ModCFML. Since the CB servers are Lucee bound with Undertow, and since we assign just one webroot to it, I was just trying to figure out if running another CF app on the same server requires another CB server or if it can be more like ACF/Apache with virtual hosts…
Found your post on the Ortus community forum. Looks like exactly what I need. Gracias!
@bdw429s I see an option in CB for
ModCFML.createVirtualDirectories
but there’s nothing about it in the documentation (or on the Google). Is this something related to the setup I might want, or is this like the old style Apache option for web versions of users’ home folders? Anywhere I could get more info on that option?
b
@Peter Hoopes that's because the apache mod_cfml connector and Boncode AJP connector never added support on their end for it.
I was in contact with both developers and even went over how it would work with them, but I think they both forgot.
It also needed a change in Lucee which is documented in a ticket that's been in their backlog for years
I did all the work on CommandBox's side, but no one else did anything so I left it out of the docs 😔
What the feature did was allow you to run CF code inside of a virtual dir defined in your web server WITHOUT needing to create a matching CF mapping in Lucee.
Adobe CF always supported this in their connector.
p
Ah. Got it. The other similar item is that while the ModCFML page shows a web:hostAlias entry in the example
server.json
file, it’s not one of the auto-generated tab-complete options in CB. That made me wonder if that example file is older or if it’s no longer needed. Just FYI.
b
That key is used by the hostupdater module, which is something you install. It's not part if CommandBox's core
Which is why it's not in tab complete. The docs may need a note of clarification.