Node.js 节点应用程序路由和nginx位置如何匹配?

Node.js 节点应用程序路由和nginx位置如何匹配?,node.js,nginx,Node.js,Nginx,我将在nginx上运行node应用程序 这里是nginx配置 location /first { proxy_pass http://localhost:3000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; }

我将在nginx上运行node应用程序

这里是nginx配置

location /first {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
这是节点应用程序路由器

app.use('/', indexRouter);
app.use('/api', apiRouter);
但当我通过x.x.x.x/first访问服务器时 我得到404个错误。 原因是什么。 如果你知道,请告诉我