0

I've dealt with this error in the nginx error log for the past few hours.

*2 connect() failed (111: Connection refused) while connecting to upstream, client: my ip, server: my domain, request: "GET / HTTP/2.0", upstream: "http://127.0.0.1:3000/", host: "my domain"

I'm currently trying to deploy a next.js app with nginx using engintron for CPanel as well as pm2.

default.conf

server {
    listen [::]:80 default_server ipv6only=off;

    server_name my domain domain-ip;

    # deny all; # DO NOT REMOVE OR CHANGE THIS LINE - Used when Engintron is disabled to block Nginx from becoming an open proxy

    # Set the port for HTTP proxying
    set $PROXY_TO_PORT 8080;

    include common_http.conf;

common_http.conf

location / {
    proxy_pass http://127.0.0.1:3000;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection 'upgrade';
    proxy_set_header Host $host;
    proxy_cache_bypass $http_upgrade;
}

There aren't any errors on pm2's front, and sudo nginx -t works just fine, so I'm confused on what exactly the issue is.

Any sort of help is appreciated, have a good rest of your day :)

1 Answers1

0

Fixed the issue, for some reason my pm2 wasn't working properly, after a clean reinstall I got this issue fixed, but now I've got a 404 not found for my index file, the fun life of being a developer lol