server { listen 80; root /usr/share/nginx/html; index index.html; location / { try_files $uri /index.html; } location /api/ { # The following statement will proxy traffic to the upstream named Backend proxy_pass ${api_host}; } }