Home > Software design >  How a frontend container can communicate with an API container on the same EC2 instance using a load
How a frontend container can communicate with an API container on the same EC2 instance using a load

Time:01-25

I have my Ec2 instance running a multiple container application. My frontend is running Vue js and my backend is running. Net core 5. I have nginx reverse proxied with my frontend docker file. On my local machine, the system is working fine. The containers are communicating using the machine ports. The problem I have now is I have the ssl certificate on a load balancer for my ec2 instance. I can reach my frontend fine, but it can't communicate with my backend as it is making an http request. I have tried creating another application load balancer for my API port to use https on another port but that is also not working. Is there a solution for this without getting another ssl certificate for the server?

CodePudding user response:

If you use the certificate from ACM, the certificate will be terminated by the ALB, then the ALB will send http traffic to your EC2 instance.

Please make your frontend use https request, and if you setup right, the ALB will terminate the ssl, and your backend will receive the http request without install ssl certificate in the server.

  •  Tags:  
  • Related