upstream backend { ip_hash; server backend:8000; } upstream frontend { ip_hash; server frontend:3000; } server { location ~ /(api|felicity-gql)/ { proxy_pass http://backend; proxy_set_header Host $http_host; proxy_set_header X-Forwarded-Host $host; } location / { proxy_pass http://frontend; proxy_set_header Host $http_host; proxy_set_header X-Forwarded-Host $host; } listen 80; server_name localhost; }