I keep getting this error when I try to connect to my reverse proxy:
2022/09/20 01:06:43 [error] 25#25: *5 connect() failed (111: Connection refused) while connecting to upstream, client: x.x.x.x, server: localhost, request: "GET /sdr_user HTTP/1.1", upstream: "http://127.0.0.1:59524/values", host: "localhost:9191"
2022/09/20 01:06:43 [warn] 25#25: *5 upstream server temporarily disabled while connecting to upstream, client: x.x.x.x, server: localhost, request: "GET /sdr_user HTTP/1.1", upstream: "http://127.0.0.1:59524/values", host: "localhost:9191"
2022/09/20 01:06:43 [error] 25#25: *5 connect() failed (111: Connection refused) while connecting to upstream, client: x.x.x.x, server: localhost, request: "GET /sdr_user HTTP/1.1", upstream: "http://127.0.0.1:59524/values", host: "localhost:9191"
2022/09/20 01:06:43 [warn] 25#25: *5 upstream server temporarily disabled while connecting to upstream, client: x.x.x.x, server: localhost, request: "GET /sdr_user HTTP/1.1", upstream: "http://127.0.0.1:59524/values", host: "localhost:9191"
I have tried searching and it said to define my upstream server which i already have in my default.conf file like this:
upstream api_server {
server localhost:59524;
}
server {
listen 80;
server_name localhost;
location /sdr_user{
proxy_pass http://api_server/values;
}
}
My reverse proxy is located in another container separate from my other projects. However, when I directly access localhost:59524, i can access the link without any issues.
Am I missing another configuration?