I think this is an XY problem.
You probably ought to proxy to your web applications on a local port rather than pointing users to weird ports. That’s generally how folks handle this.
We recently had someone with the same problem (they wanted port 8000, but it’s the wrong solution in either case). I’m sure your application server documentation covers proxying through Apache or nginx, because that’s how you should deploy web apps for production. No access to https through a new port - #39 by Joe