In AWS VPC
when the frontend ec2 server is in private subnet
and also the backend ec2 server is in private subnet
with these 2 conditions
how can I make http connection possible with these two private subnets?
Do I have to use load balancer or other something else?
and how do I have to configure?
Yes, you will need a Load Balancer in a public subnet. It can receive traffic from the Internet and send it to resources in private subnets.
All subnets can communicate with each other, but private subnets (by definition) can't communicate with the Internet.
You can use either an Application Load Balancer (which is layer 7 and re-sends HTTP/S requests) or a Network Load Balancer that forwards the requests without rewriting them.
If your EC2 instances in the private subnet(s) need outbound access to the Internet, you would also need a NAT Gateway or NAT Instance.