port forwarding in tomcat 8 based on domain name so that SSL on both domains can work

Job ID: 33532115

Budget: ₹600 – ₹1,500 INR

Lets say I have 2 domains, a.com on port 8443 and b.com on port 18443. Now both are working on different ports and SSL are working. I want default port 443 to forward to port 8443 for domain a.com and port 18443 for domain b.com. Server is digital ocean on centos 7.9.
Related categories: System Admin Linux Nginx CentOs SSL