Hi. Is it possible to setup Commandbox with embedd...
# box-products
r
Hi. Is it possible to setup Commandbox with embedded server and IIS on same server/port80 to use with external web-sites? I want to use Coldbox API Rest, but it doesn't work by IIS AJP Connector (rewrites don't override)
b
@romanstr Firstly, we can help you with whatever your rewrite issue is on IIS. It IS possible to make that work. But to answer your question, yes you can run CommandBox on Port 80.
If you have a more specific question about HOW to do this, please explain what is not working for you.
Generally speaking you really just need to start the server like so
Copy code
start port=80 host=0.0.0.0
A couple notes • ensure no other web server is also running and bound on port 80 or you'll have conflicts • You can only bind one process to the same port/host so if you want to have two servers both on port 80 (and not use a proxy like IIS), you'd need different LAN IPs. • You'll need to run as
root
on Linux to bind to any port below 1024 (It's just a *nix restriction) • I'd recommend looking at the CommandBox service manager module to help start your servers on boot. https://commandbox-service-manager.ortusbooks.com/
p
You can also run commandbox on whatever port is available; and in IIS do a reverse proxy to it so it doesnt interrupt any other IIS sites being hosted. Or Brad's approach if it is the only site on that IIS instance.
☝️ 1