Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
273 views
in Technique[技术] by (71.8m points)

amazon web services - How to configure secure deployment environment on aws and deploy angular and spring boot application

I was trying to deploy spring boot application as a backend and angular application as front end on aws. After I pushed my docker image on ECS I was able to run multiple services behind application load balance. I have two application load balancers one in front of angular ngnix docker services which listen port 80 the other in front of spring boot docker services that listen port 8080 as a backend service. The frontend and the backend services are on separate subnets that I configured. After I set up Route 53 I was able to run my application on port 80/8080.

I configure SSL for the front end using my domain name. When I try to use https connection I am unable to call the backend application load balancer dns. I am getting the following error.

mixed content the page at was loaded over https backend frontend

I believe it is caused when my frontend(angular) application try to call backend through http call.

I am new to configure the deployment environment. Is this the right approach? to have two load balancers? Do I need to create ssl for the backend load balancer as well? what is the best approach properly deploy my application on aws? I appreciate your help.

question from:https://stackoverflow.com/questions/65879003/how-to-configure-secure-deployment-environment-on-aws-and-deploy-angular-and-spr

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Your services configuration may work, even if it can be possible to use only one ALB and to use Cloud Front / S3 to deploy your Angular app... Just be careful to optimize the use of services to avoid high costs (maybe two ALB are not useful for your use).

The DNS of the Front is with HTTPS ? And your back only HTTP ? You have to configure https in your ALB to make it work and you won't have mixed content pb anymore.

Tell me if the solution is ok.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...