Strapiv4 deployment on ubuntu

System Information
  • Strapi Version: 4.0.5
  • Operating System: ubuntu 20.04.3
  • Database: progres
  • Node Version: 16.3.2
  • NPM Version: 8.1.2
  • Yarn Version:

I tried to deploy it on AWS ec2, but it failed to load to the resource with the above error, I added the security header with the following config. How can I resolve it?

            proxy_pass         http://127.0.0.1:1337;
            proxy_http_version 1.1;
            proxy_set_header   Upgrade $http_upgrade;
            proxy_set_header   Connection keep-alive;
            proxy_set_header   Host $host;
            proxy_cache_bypass $http_upgrade;
            proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header   X-Forwarded-Proto $scheme;