Can Commandbox run a CF/Lucee instance on port 80/...
# box-products
a
Can Commandbox run a CF/Lucee instance on port 80/443 on the same machine that I'm also hosting other IIS sites on port 80/443 ? Before I started looking into Commandbox my dev environment was/is running several IIS sites all bound to port 80 and 443 but using different domain names. I know the httppost(?) module lets you use a custom domain name but in my scenario it errors saying port 80 is already in use. Whilst this is technically true, it is not true for the domain name I am telling Commandbox to use.
b
Yes, if they use a different host
The basic rule of thumb that's true of networking stacks on every OS is that only a single process can bind to a given port on a given host
IIS likes to bind to 0.0.0.0 by default I think which will prevent any other process from binding to the same ports on any host.
So you'd need IIS on one IP and CommandBox on another IP
Keeping in mind, Windows will let you use 127.0.0.1, 127.0.0.2, 127.0.0.3, etc all to point to localhost
Assuming you don't need these sites to be externally accessible
I'd really recommend you check into whether you need IIS in the mix at all. All my local dev is just pure CommandBox. And the hostupdater module makes it really easy to run all my local sites on the same port using the trick above if I want.
@Adam Brunt
a
Ok so IIS is required to run non-CF/non-Lucee applications eg .Net which we also develop. We have 4 local IIS sites in total. Maybe it is the IP address I am missing in the server.json file ? My hosts file has entries for the 4 domains all pointing to 127.0.0.1. Perhaps I just need to tell the hostupdater module to use 127.0.0.2 as well as the domain name ?
b
I think the clear answer here is to drop .NET šŸ˜‰
Perhaps I just need to tell the hostupdater module to use 127.0.0.2 as well as the domain name ?
You don't really "tell" the hostupdater module to do anything. You simply install and it magically updates your
hosts
file when the server starts
Just keep in mind, Windows 10+ will require CommandBox be running in an admin console to edit the hosts file unless you've enabled "developer mode" in Windows.
a
Re .Net 🤣 if only. Just one of the joys of switching our CMS system from one that used CF to a Microsoft one
b
Seems like a step backwards
Did you consider ContentBox?
It can be used as a headless CMS a well
Professionally supported CF and open source
a
It was above my pay grade as they say; moved from a little known CF CMS, callled iCM, to Sitecore
So how do I get the hostupdater module to use a different IP to IIS ? Even if I use the host oaram I still get the port 80 is already in use error šŸ˜•
b
• ensure IIS isn't binding to all IPs • just install it