I have two servers, one with a public ip and the other with a local ip within the same network. The server with public ip has NGiNX configured as a reverse proxy of some apps. The server with local ip has an application running on port 5000, something like: 192.168.1.244:5000
, my question is if I can use the server with NGINX to output the application already mentioned.
I currently have a configuration like this:
server {
listen 80;
server_name mi.dominio.com;
location / {
proxy_pass http://192.168.1.244:5000/$uri$is_args$args;
proxy_set_header Host $host:$server_port;
}
}
And it does not work.
It should be noted that I also tried to do something simpler such as redirecting it to port 80
server {
listen 80;
server_name mi.dominio.com;
location / {
proxy_pass http://192.168.1.244;
proxy_set_header Host $host:$server_port;
}
}
And that did work.