magento2.4 – Fresh Magento 2.4, nginx reverse Proxy can’t redirect to fresh Magento 2.4

I am installing a fresh Magento 2.4 on a docker-compose stack with these specs:

  1. Reverse proxy: jwilder/nginx-proxy
      - "80:80"
      - "443:443"
      - conf:/etc/nginx/conf.d
      - vhost:/etc/nginx/vhost.d
      - html:/usr/share/nginx/html
      - dhparam:/etc/nginx/dhparam
      - ./certs:/etc/nginx/certs:ro
      - /var/run/docker.sock:/tmp/docker.sock:ro
      - nginx-proxy
  1. web running apache expose on port 80 and 22.

Long story short, I have had no problem installing magento 2.3.5 and before that with that docker-compose setup. But starting Magento 2.4.0, I added elasticsearch container to my setup, confirm seeing setup landing page “Welcome to Magento Admin”. But after i run /bin/magento setup:install with Basic install. I am getting “502 Bad Gateway”. I suspect my reverse proxy can’t detect my web container apache after running setup:install but it was able to see it before running setup:install. So what change to my apache.conf file I need to setup to get thing work again. What could go wrong here. I can’t think of any. Any help?