0

I am creating a project with AWS and some of its services as part of a course activity, and I managed to get the Nginx to run on port 80 as I set it up in my EC2 instance once I disabled Apache from the same port. However, the activity isn't very clear and states to replace the default configuration with:

server {
    listen 80 default_server;
    listen [::]:80 default_server;
    server_name _;

    location /{
            root /opt/aws-thought/client/build;
            index index.html;
            try_files $uri /index.html;
    }
    location /api/ {
            proxy_pass http://localhost:3001;
    }
}

Now when I restart Nginx and test the public IPv4 address, I get a 500 Error page with "nginx/1.18.0 (Ubuntu)" stated under it. The syntax appears to be okay, and I guess the error may be with the location block. I'd appreciate any help, and thanks in advance!

JesG-77
  • 1
  • 2

0 Answers0