Docker Compose + Nginx reverse proxy: error 502 Bad Gateway, Connection reset by peer #3559
Replies: 4 comments 3 replies
-
same here since last Update of nginx i using teslamate and ip-symcon. |
Beta Was this translation helpful? Give feedback.
-
Check the output of |
Beta Was this translation helpful? Give feedback.
-
curl: (56) Recv failure: Connection reset by peer |
Beta Was this translation helpful? Give feedback.
-
My setup is similar, but I use Here is my services:
server:
container_name: nginx-proxy
image: nginxproxy/nginx-proxy:1.1
ports:
- published: 80
target: 80
- published: 443
target: 443
restart: always
volumes:
- certs:/etc/nginx/certs:rw
- vhost:/etc/nginx/vhost.d:rw
- www:/usr/share/nginx/html:rw
- /var/run/docker.sock:/tmp/docker.sock:ro
site:
container_name: site
depends_on:
- ssl
environment:
LETSENCRYPT_EMAIL: [email protected]
LETSENCRYPT_HOST: mydomain.xyz
VIRTUAL_HOST: mydomain.xyz
image: nginx:stable
restart: always
ssl:
container_name: acme-companion
depends_on:
- server
environment:
DEFAULT_EMAIL: [email protected]
NGINX_PROXY_CONTAINER: nginx-proxy
image: nginxproxy/acme-companion:2.2
restart: always
volumes:
- certs:/etc/nginx/certs:rw
- vhost:/etc/nginx/vhost.d:rw
- www:/usr/share/nginx/html:rw
- /var/run/docker.sock:/tmp/docker.sock:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
- acme:/etc/acme.sh:rw
trilium:
container_name: trilium
depends_on:
- ssl
environment:
LETSENCRYPT_EMAIL: [email protected]
LETSENCRYPT_HOST: notes.mydomain.xyz
VIRTUAL_HOST: notes.mydomain.xyz
VIRTUAL_PORT: 8080
image: zadam/trilium:0.58-latest
ports:
- published: 8080
target: 8080
restart: always
volumes:
- certs:/home/node/certs:rw
- acme:/home/node/acme:rw
- /var/local/trilium-data:/home/node/trilium-data:rw
version: '3.3'
volumes:
acme: {}
certs: {}
vhost: {}
www: {} The logs from
All other containers run without any errors. However, I noticed something in
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey, I just installed Trilium via Docker Compose and I am having trouble with nginx and a reverse proxy.
Here is my docker-compose.yml (I changed the port since I have another service running on port 8080)
and the reverse proxy section in my nginx config:
There are no errors in the docker container logs, and this is the status on docker:
When I try to visit https://mydomain.com/trilium/ I get error 502 Bad Gateway. This is the error I am getting in my nginx log:
2023/01/24 17:12:01 [error] 1110637#1110637: *1565 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: my ip, server: mydomain.com, request: "GET /trilium/ HTTP/1.1", upstream: "http://127.0.0.1:8050/", host: "mydomain.com"
I'm still new to docker and reverse proxies, so I've probably made a error somewhere. Any help would be greatly appreciated, thank you!
Beta Was this translation helpful? Give feedback.
All reactions