Good day. How to configure nginx to start a project on agular2?

There is a server on Amazon installed on it npm, http-server and nginx. Tried to adjust by answer .

But it did not work out. 403 Forbidden Error.

Config nginx (here already tried to do through a proxy):

server { listen 80 default_server; listen [::]:80 default_server; root /var/www/html; index index.html index.htm; server_name ec2-35-156-242-165.eu-central-1.compute.amazonaws.com; location / { try_files $uri $uri/ =404; proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $http_host; proxy_pass http://172.31.17.51:8080; } } 

I want to note that when with such settings I make http-server ./dist and follow the link of the domain http: //***.amazonaws.com/, it does not display any errors, but the application does not launch the angular

  • Comments are not intended for extended discussion; conversation moved to chat . - Nick Volynkin

0