server { listen 80; server_name localhost; location /api { # Proxy requests to the API service proxy_pass http://api:3080/api; } location / { # Serve your React app root /usr/share/nginx/html; try_files $uri $uri/ /index.html; } }