* 192.168.1.100 (reverse proxy and ssh tunnel server) : centos 8 + sshd 8 + nginx 1.14.1 + firewalld disabled
* 192.168.1.101 (local web server) : windows 10 + web App (port 80) exposed to remote access with SSH reverse tunnel (port 6033)
* 192.168.1.102 (remote machine) : Ubuntu + curl
curl http://192.168.1.100:6033/api/Users ==> works well
curl http://192.168.1.100/tunnel/api/Users ==> "the page you are looking for is temporarily unavailable" !!!
tried with this [/etc/nginx/nginx.conf]
...
http {
...
server {
...
location /tunnel/ {
proxy_pass http://127.0.0.1:6033;
}
}
}
then with this [/etc/nginx/nginx.conf]
...
http {
...
upstream tunnel {
server 127.0.0.1:6033;
}
server {
...
location /tunnel/ {
proxy_pass http://tunnel;
}
}
}
how to make a working nginx configuration that forward server port 80 to the ssh tunnel port 6033?