We are using web app(angular) and api(node.js) running on nginx. I need to use the AWS Load balancer , domain name (route 53), SSL Certificate (ACM).
I have obtained the SSL from ACM. I have created the elastic load balancer and attached the ssl certificate. I have assigned the web servers to the AWS load balancer. I have created the domain name in route 53 and pointed to the load balancer. I have updated the nginx configuration file and added the domain name to the server name
I am able to access the webservers from the https://example.com but the webservers are not connecting to the api servers. I am getting error "Failed to connect" when i try to login the web app
I believe that the api server should also have the ssl certificate attached.
Currently, I do not have the API server in the load balancer.
How can i configure the web app servers and api servers with the ssl certificate using the AWS load balancer?
How do I add ssl certificate to the api server? do i need to create an internal load balancer and add the ssl certificate. if yes, how do i use the internal load balancer with the web server load balancer?
What would be the architecture for the same?
Without the load balancer, I was able to connect to web app and api using the godaddy ssl and domain for web and api.
However, I am not able to use the aws load balancer and aws certificate manager
Nginx config
Web server
server
{
listen 80;
server_name example.com;
return 301 https://example.com$request_uri;
root /Website/dist/;
index index.html;
}
API server
server
{
listen 80 ;
server_name ipaddress_api;
location /
proxy_pass http://localhost:7000;
}