EasyEngine docker nginx alongside system nginx

Hi, I have been trying to make EasyEngine docker nginx container (services_global-nginx-proxy_1) work with the nginx installed in my system using apt. I have removed the port mappings from services_global-nginx-proxy_1 container and configured nginx reverse proxy to point to the services_global-nginx-proxy_1 container ip and port 443. This setup works fine for a single site but as soon as I add another one, the url of the second site redirects to the first. I tried using different ip and ports in proxy_pass for the second site reverse proxy but it only seems to work with the ip and port of services_global-nginx-proxy_1 container which causes it to redirect it to the url of first site.

I would like to know how can I configure the second site to not redirect. Also, if I create a new site using ee create command, it fails at the part where it tries to check if site is online or not so does this means the site hasn’t properly installed? Both the site in questions are Wordpress. I am using certbot to generate certificates for the sites and not the --ssl=le switch.