server { listen 80; listen [::]:80; # Frontend location / { root /static/; } # Backend location /api/ { # Slash at the end is necessary to rewrite the path proxy_pass http://localhost:3000/; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $remote_addr; } }