I have 2 EC2 instances.
- HAProxy server listening on port 80
x.x.0.79
- Client - meant to just send curl commands and test.
x.x.0.12
I am using AWS Route Tables to redirect any requests in my VPC with a destination of x.x.0.35
to be routed to the HAProxy box x.x.0.79
.
I am sending curl commands to curl x.x.0.35
from the 2nd EC2 box x.x.0.12
When I curl x.x.0.35
, I can see traffic hitting the HAProxy box x.x.0.79
by monitoring tcpdump -qn -s 0 -A port 80
.
However, the HAProxy server is not receiving those requests. The requests are just timing out. They are not even hitting the default backend.
This is my haproxy.cfg.
defaults
mode http
timeout client 10s
timeout connect 5s
timeout server 10s
timeout http-request 10s
frontend myfrontend
bind :80
acl source_ip_a src x.x.x.121
acl source_ip_b src x.x.0.235
acl destination1 dst x.x.0.35
use_backend backend_a if source_ip_a
use_backend backend_b if source_ip_b
use_backend backend_a if destination1
default_backend temp
backend backend_a
server destination_a x.x.0.57:8000
backend backend_b
server destination_b x.x.0.178:8000
backend temp
server destination_c 127.0.0.1:8000
Any advice or guidance would be much appreciated. Thank you.