[Deployment Issue] nginx 111: Connection refused after changing Nginx port.

Open
#2,475 5 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Active
Tech stack
docker, nginx

Research direction

Review the nginx override linked from issue #1166 and the sample app deployment steps first, then reproduce the request through port 8080 while inspecting the logged upstream address. Done means the sample app is reachable after the port change, or the issue documents the confirmed configuration limitation and required setting.

Written by the indexing model from the issue text.

Description

deployment-issue

What is the problem?

After changing the nginx port to 8080 because I cannot bind to 80/443, I receive nginx errors when accessing an app.

Steps to reproduce the problem:

Use the nginx override for installation (https://github.com/caprover/caprover/issues/1166#issuecomment-2430704491)
Deploy sample small app.

captain-nginx.1.xj1wp93grywi@podroid    | 2026/09/06 15:33:56 [error] 118#118: *7 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.1.230, server: sample.192.168.1.149.nip.io, request: "GET / HTTP/1.1", upstream: "http://10.0.1.8:80/", host: "sample.192.168.1.149.nip.io:8080"
captain-nginx.1.xj1wp93grywi@podroid    | 2026/09/06 15:33:57 [error] 133#133: *13 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.1.230, server: sample.192.168.1.149.nip.io, request: "GET / HTTP/1.1", upstream: "http://10.0.1.8:80/", host: "sample.192.168.1.149.nip.io:8080"
captain-nginx.1.xj1wp93grywi@podroid    | 2026/09/06 15:33:58 [error] 133#133: *13 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.1.230, server: sample.192.168.1.149.nip.io, request: "GET / HTTP/1.1", upstream: "http://10.0.1.8:80/", host: "sample.192.168.1.149.nip.io:8080"
captain-nginx.1.xj1wp93grywi@podroid    | 2026/09/06 15:34:43 [error] 133#133: *13 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.1.230, server: sample.192.168.1.149.nip.io, request: "GET / HTTP/1.1", upstream: "http://10.0.1.8:80/", host: "sample.192.168.1.149.nip.io:8080"

Output of the following command on your server:

podroid:# uname -a && lsb_release -a && free -h
Linux podroid 7.1.5 #1 SMP PREEMPT Sat Aug 22 17:20:37 UTC 2026 aarch64 Linux
-sh: lsb_release: not found
podroid:
# free -h
total used free shared buff/cache available
Mem: 3.8G 359.6M 2.8G 768.0K 646.7M 3.3G
Swap: 5.7G

Dominant language
TypeScript
Stars
15.2k
Forks
1k
Avg merge
10h 28m
Merged PRs (30d)
25

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from caprover/caprover

All issues in caprover/caprover

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.