You run a proxy on your server (the easiest is “nginx proxy manager” that has a nice web UI), then open your router to port 80 and 443 to nginx proxy manager (NOT the web UI configuration port!)
Then you instruct the proxy to route the traffic according to the URL.
Someone coming to 10.172.172.172 with no URL? Drop the connection.
Someone going to if.example.com? Forward to 192.168:8080 and so on
Set the A record to your IP address and CNAME to @ to all the subdomains you need