I am trying to run node app on nginx.
Here is my nginx configuration.
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;
}
And here is node app router.
app.use('/', indexRouter);
app.use('/api', apiRouter);
But when I access server via x.x.x.x/first I get 404 errors. What is the reason. Please let me know if you know.