I have a NGINX server deployed on Fly which proxies to a Node server I also deployed on Fly.
I am getting this error:
[error] 310#310: *1 recv() failed (104: Connection reset by peer) while reading response header from upstream
Here’s the nginx.conf:
location / {
root /usr/share/nginx/html;
try_files $uri /index.html;
sendfile on;
tcp_nopush on;
}
location /api/ {
proxy_pass http://backend.flycast:8080/;
proxy_set_header X-Forwarded-Host $http_host;
proxy_ssl_name $host;
proxy_ssl_server_name on;
}
And my Node server has this in fly.toml:
[http_service]
internal_port = 8080
auto_stop_machines = true
auto_start_machines = true
min_machines_running = 0
processes = ['app']