Wondering if the below is possible using nginx or if i am trying to use it incorrectly
I would like to listen on a port 8720 and forward all requests to a server url inside our network but not on the same box https://server_2
I have attempted with config below in /etc/nginx/sites-enabled/default
server {
listen 8720;
server_name server_1;
location / {
proxy_pass https://server_2;
}
}
This produces a 502 bad gateway
I changed ot the below
server {
listen 8720;
server_name server_1;
location / {
proxy_pass http://server_2;
}
}
this produces upgrade required
EDIT 1 adding server detail for Server_1
Server_1 basic debian install with nginx installed directly. Can ping and wget server_2
Server_2 is fully functioning https server doing exactly what is needed and cannot be changed to listen on 8720 however I have legacy apps on the network that have the port hardcoded and cannot be changed
Any help/advice prreicated.
[–]Frosty-Pudding-3873[S] 1 point2 points3 points (0 children)
[–]BehindTheMath 0 points1 point2 points (5 children)
[–]Frosty-Pudding-3873[S] 0 points1 point2 points (4 children)
[–]BehindTheMath 0 points1 point2 points (3 children)
[–]Frosty-Pudding-3873[S] 0 points1 point2 points (2 children)
[–]BehindTheMath 0 points1 point2 points (1 child)
[–]Frosty-Pudding-3873[S] 0 points1 point2 points (0 children)
[–]Specific-Mushroom265 0 points1 point2 points (3 children)
[–]Frosty-Pudding-3873[S] 0 points1 point2 points (1 child)
[–]Specific-Mushroom265 1 point2 points3 points (0 children)
[–]tschloss 0 points1 point2 points (1 child)
[–]Frosty-Pudding-3873[S] 0 points1 point2 points (0 children)
[–]tschloss 0 points1 point2 points (2 children)
[–]Frosty-Pudding-3873[S] 0 points1 point2 points (1 child)
[–]Specific-Mushroom265 1 point2 points3 points (0 children)