• Support
  • Cannot create new Node Js project in another port (e.g 3001)

i trying to deploy another website on node js again, it seems that set another port than standard port cannot connected to nginx

log

the projects run well, when i try run it on terminal, the curl return properly

but whenever i create it on node js project, it seems that project cannot connect to port 3001

i have open port too in firewall, but it not listening to the project

i have restart nginx, and recreate it, but it still same.

what's wrong?

first curl is test on server terminal, second curl trying to the node js project*

i have try to run the nuxt project on port 3001 with command

NITRO_PORT=3001 node .output/server/index.mjs

the project crashed and doesn't want to run. so i remove it

this is the error log

....... # same error
2025/01/22 19:54:17 [error] 387360#0: *94 connect() failed (111: Connection refused) while connecting to upstream, client: 180.251.232.97, server: swappes.rynn.fun, request: "GET / HTTP/2.0", upstream: "http://127.0.0.1:3001/", host: "swappes.rynn.fun"
2025/01/22 19:59:15 [error] 387360#0: *135 connect() failed (111: Connection refused) while connecting to upstream, client: 180.251.232.97, server: swappes.rynn.fun, request: "GET / HTTP/2.0", upstream: "http://127.0.0.1:3001/", host: "swappes.rynn.fun"
2025/01/22 19:59:16 [error] 387360#0: *138 connect() failed (111: Connection refused) while connecting to upstream, client: 180.251.232.97, server: swappes.rynn.fun, request: "GET / HTTP/2.0", upstream: "http://127.0.0.1:3001/", host: "swappes.rynn.fun"
2025/01/22 20:02:34 [error] 387484#0: *141 connect() failed (111: Connection refused) while connecting to upstream, client: 94.154.35.225, server: swappes.rynn.fun, request: "GET /wp-content/ HTTP/1.1", upstream: "http://127.0.0.1:3001/wp-content/", host: "swappes.rynn.fun"
2025/01/22 20:04:28 [error] 387484#0: *145 connect() failed (111: Connection refused) while connecting to upstream, client: 180.251.232.97, server: swappes.rynn.fun, request: "GET / HTTP/2.0", upstream: "http://127.0.0.1:3001/", host: "swappes.rynn.fun"

okay my bad, seems that Nuxt is 'tricky' to set another port, whenever i build the project it keep to default lol, so i hard code the port