I've been tasked to figure out a way to use Apache to read the incoming URL (https://www.example.com) or (https://www.example2.com) and redirect the connection to another internal server. Is the reverse proxy the right thing to use? also, can this be used in virtual hosts?
The answer to both questions is "Yes". ProxyPass, ProxyPassReverse and ProxyBalance are the directives in question. Hope this helps, Dave.