for Nginx and Apache
(a normal reverse tunnel: ssh -R 61001:localhost:22 user@myhost.tld
)
Asuming your local application runs on port 3000
(http://localhost:3000/
in the browser shows your nice webpage) we login with a user noroot
and the ssh port 22
on the host myhost.tld
to forward that to the server port 61001
. Being logged in on the the server noroot@myhost.tld:22
the command curl -v http://localhost:61001/
should be equal to on the local machine http://localhost:300
just run: ssh -i ~/.ssh/server.key -l noroot -p 22 myhost.tld -R 61001:localhost:3000