upstream notemark-backend { server notemark-backend:8000; } upstream notemark { server notemark:8000; } server { listen 80; location / { proxy_pass http://notemark; } location /api { proxy_pass http://notemark-backend/api; } }