You can combine with the --server.baseUrlPath config option to make your nginx setup simpler (because everything will be nested inside your subfolder)
Here’s what I’ve been using for instance:
location /nlp/viewer/ {
	proxy_pass         http://34.70.xxx.yyy:8000/nlp/viewer/;
	proxy_set_header   Host      $host;
	proxy_set_header   X-Real-IP $remote_addr;
	proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
	proxy_set_header   X-Forwarded-Proto $scheme;
	proxy_buffering    off;
	proxy_http_version 1.1;
	# Also requires websocket:
	proxy_set_header Upgrade $http_upgrade;
	proxy_set_header Connection "upgrade";
	proxy_read_timeout 86400;
}