Below is the desired goal:
- End user is redirected from my custom application to the DNS of Apache/Nginx with IP address as one of its query parameter.
- Apache/Nginx should redirect/proxypass the request to the IP address mentioned in query parameter.
- End user should only see the Apache/Nginx DNS and not the IP address in query parameter once the first response is received.
- user hits : https://:443/?host=18.104.22.168.
- Apache reads the "host" query parameter value and redirects/forwards the request to host value(22.214.171.124).
- For end user the URL is reconstructed and the query parameter (host) is removed so as to keep the IP hidden from end user once connection is established.
Below are the issue I am facing:
- I configured apache with rewrite rule but it exposes the end server to the user.
- I tried apache proxypass where the Apache DNS is only exposed throughout but the initial query parameter (host) remains as it is.
To summarize: I want a custom load balancer which will transfer my request to a specific target without exposing target IP. Target should be choose by load balancer dynamically based on query parameter or path of URL.
Any help will be appreciated. I am open to use some other services as well so please suggest any possible solution.