Você deve simplificar a configuração:
location /nodeApp/ {
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header Scheme $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:8142/;
proxy_buffering off;
}
Nesse caso, o nginx cuidará da barra final. Veja link
If a location is defined by a prefix string that ends with the slash character, and requests are processed by one of
proxy_pass
, [...], then the special processing is performed. In response to a request with URI equal to this string, but without the trailing slash, a permanent redirect with the code 301 will be returned to the requested URI with the slash appended.
Além disso, não há necessidade de variáveis em proxy_pass
. O Nginx substituirá o prefixo /nodeApp/
por /
e anexará as sequências de consulta automaticamente.