Problem with DNS port forwarding (EC2 deployment, nginx proxy_pass, ipv6?)

I am hosting my apps on a t2.micro EC2 without any problems except running out of memory errors.
On this machine I used NGINX to forward to my custom domain e.g. for my nginx.conf file:


    server {
        listen          80;
        server_name     app2.mydomain.com;
        client_max_body_size 100M;
        location / {
                        proxy_pass http://localhost:5401/;
                        proxy_http_version 1.1;
                        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                        proxy_set_header Host $host;
                        proxy_set_header Upgrade $http_upgrade;
                        proxy_set_header Connection "upgrade";
                        proxy_read_timeout 86400;
                        client_max_body_size 100M;
                        }
        }

    server {
        listen          80;
        server_name     app1.mydomain.com;
        client_max_body_size 200M;
        location / {
                        proxy_pass http://localhost:5403/;
                        proxy_http_version 1.1;
                        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                        proxy_set_header Host $host;
                        proxy_set_header Upgrade $http_upgrade;
                        proxy_set_header Connection "upgrade";
                        proxy_read_timeout 86400;
                        client_max_body_size 200M;
                        }
        }

This worked great. At some point I decided to upgrade and deploy them on a different machineā€¦
I do exactly the same, with the same nginx.conf file
obviously updated my DNS settings on my domain dashboard to the new machine IP, and this doesnt work for some reason.
One thing I notices is that when checking the exposed ports, I see that the streamlit apps are tcp6 on the new machine, and are just tcp on the previous one, could this be the reason? how do I solve my problem?

I am quite new to this and would love some help
open for any suggestions :slight_smile: