How configure nginx.conf with AWS ECS Service connect(each services on same cluster)?
In my cluster, I have two services: one for nginx and one for the Next.js client. The Next.js service is on a private subnet, while the nginx service is on a public subnet. In the AWS console, I enabled service connect when defining the services (Next.js service is set as ‘client and server’ and nginx service as ‘client side only’) and I defined the DNS as ‘nextjs-service’. Then, in the nginx.conf file, I configured it like this: