I have a NodeJS backend running on a server on port 3000
the requests are arriving on port 80
now in /etc/nginx/sites-available/node I have the following config
server {
listen 80 default_server;
server_name name.example;
return 301 http://195.x.x.x:3000;
}
when a request reach the server it redirects to port 3000
but when a request like http://195.x.x.x/api/test/test
it also redirects to http://195.x.x.x:3000
how can I redirect to port 3000 and keep the same url like http://195.x.x.x:3000/api/test/test