AWS: How to create a reverse proxy based on URLs?
I am trying to configure a Reverse Proxy in my AWS account:
The Reverse proxy should forward request to internal servers based on their URL structure, e.g.:
example.com/question/* -> 192.168.0.1
example.com/answer/* -> 192.168.0.2
example.com -> 192.168.0.3
I can implement a Reverse Proxy using Apache's mod_proxy
, and I wonder if AWS has a built-in solution for that.
Solution 1:
I realize this is an old question, but in case it helps anyone else: AWS now supports this use case natively using their version 2 ELBs, specifically the Application Load Balancer which was introduced in 2016.
I confirmed with their support that it provides equivalent functionality to running a mod_proxy
-based Apache reverse proxy.
More details at:
- https://aws.amazon.com/blogs/aws/new-aws-application-load-balancer/
- https://docs.aws.amazon.com/elasticloadbalancing/latest/application/introduction.html
Solution 2:
As far as I know, AWS does not have a built-in implementation for reverse proxy, even for ELBs. You can use Apache, Nginx or HAProxy for a reverse proxy implementation, though.