Service Discovery not working with Route 53 and ECS Nginx container Hosting Angular code Service Discovery not working with Route 53 and ECS Nginx container Hosting Angular code nginx nginx

Service Discovery not working with Route 53 and ECS Nginx container Hosting Angular code


I solved the problem of by keeping the angular & nginx container in the private subnet. I setup an Application Load balancer with having public ip in the public subnet. I route all the traffic from the internet using Nginx reverse proxy mechanism and the requests are resolved by Nginx and forwarded to my API containers using Route53 internal DNS. The browser must send all the requests to an Nginx location only and it should decide where to route the private intranet topic using Route53 internal dns. authenticationservice.local is my DNS entry. Here is my nginx.conf.

worker_processes  1;events {    worker_connections  1024;}http {server {    server_name  localhost;    resolver 127.0.0.1;    ssl_certificate /etc/nginx/ssl/nginx.crt;    ssl_certificate_key /etc/nginx/ssl/nginx.key;    listen 443 ssl;    root /usr/share/nginx/html/login-ui;    index  index.html index.htm;    include /etc/nginx/mime.types;    gzip on;    gzip_min_length 1000;    gzip_proxied expired no-cache no-store private auth;    gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript;    location / {        try_files $uri $uri/ /index.html;    }    location /test/api/ {            rewrite /test/api/login/ break;            proxy_set_header X-Real-IP $remote_addr;            proxy_set_header Host $host;            proxy_redirect   off;            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;            proxy_pass https://authenticationservice.local:8443/api/login;    }  }}