I have been using the jwilder's nginx + letsencrypt solution to access my containers online.
Last week my server crashed and after a restart, I couldn't access any of my containers from the internet. Accessing them from LAN works but I get "refused to connect" errors when I use the web address (I'm using DDNS with a domain I own).
Checking the logs, I immediately saw errors in letsencrypt logs like: :Verify error:: Fetching http:///.well-known/acme-challenge/oSGmRMyB-df4XEN3ZW-8ksBvtxxO8m2Di50mhpWWuu8: Connection refused
I have already double checked port forwarding on my Router and things seem to be ok. I can even use port 22 to SSH into my machine, just to validate that the port forwarding is working.
I also checked UFW status, thinking of firewall issues on my server and UFW is inactive as well.
Any suggestions on how can I debug this further?
Edit: I did an nmap on my server's local IP. I can see that all the container ports are open but the nginx ports 80 and 443 are closed. I'm now at a loss how to ensure the nginx docker container can open this port. Here's my docker-compose :
services:
nginx:
image: jwilder/nginx-proxy:latest
container_name: nginx
restart: always
labels:
com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: 'true'
ports:
- 80:80
- 443:443
volumes:
- ./data//htpasswd:/etc/nginx/htpasswd
- ./data/certs:/etc/nginx/certs:ro
- ./data/conf.d:/etc/nginx/conf.d
- ./data/vhost.d:/etc/nginx/vhost.d
- ./data/html:/usr/share/nginx/html
- /var/run/docker.sock:/tmp/docker.sock:ro
networks:
- proxy
letsencrypt:
image: jrcs/letsencrypt-nginx-proxy-companion:latest
container_name: letsencrypt_multi
restart: always
volumes:
- ./data/vhost.d:/etc/nginx/vhost.d
- ./data/certs:/etc/nginx/certs:rw
- ./data/html:/usr/share/nginx/html
- /var/run/docker.sock:/var/run/docker.sock:ro
depends_on:
- nginx
networks:
- proxy
networks:
proxy:
driver: bridge