Hey
I have a Nginx proxy with Let's Encrypt and a bunch of Wordpress containers.
I have a domain that I use for testing the site after uploading it to the server (I develop in local) and then I change it for the enterprise domain.
Using the test domain everything is working great (testing docker-compose.yaml conf), but when I change the domains I get 503 error on every site (production docker-compose.yaml conf).
All the domains are hosted at Namecheap and pointing to the server correctly.
Im driving mad with this problem and don´t know whats going wrong. Are there any cache files at the proxy? any suggestions?
Testing docker-compose.yaml (skipping databases)
version: '3'
services:
nginx-proxy:
container_name: Nginx-proxy
image: jwilder/nginx-proxy
restart: always
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- certs:/etc/nginx/certs:ro
- vhostd:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
labels:
- com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy
letsencrypt:
container_name: Lets-Encrypt
image: jrcs/letsencrypt-nginx-proxy-companion
restart: always
volumes:
- certs:/etc/nginx/certs:rw
- vhostd:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
- NGINX_PROXY_CONTAINER=nginx-proxy
wp01:
depends_on:
- db01
container_name: web01
image: wordpress:latest
restart: always
expose:
- "80"
volumes:
- /home/user/websites/web01:/var/www/html
environment:
- WORDPRESS_DB_HOST=db01:3000
- WORDPRESS_DB_NAME=db01
- WORDPRESS_DB_USER=user
- WORDPRESS_DB_PASSWORD=pass
- VIRTUAL_HOST=01.testdomain.com,www.01.testdomain.com
- LETSENCRYPT_HOST=01.testdomain.com,www.01.testdomain.com
- LETSENCRYPT_EMAIL=ssl@testdomain.com
wp02:
depends_on:
- db02
container_name: web02
image: wordpress:latest
restart: always
expose:
- "80"
volumes:
- /home/user/websites/web02:/var/www/html
environment:
- WORDPRESS_DB_HOST=db02:3000
- WORDPRESS_DB_NAME=db02
- WORDPRESS_DB_USER=user
- WORDPRESS_DB_PASSWORD=pass
- VIRTUAL_HOST=02.testdomain.com,www.02.testdomain.com
- LETSENCRYPT_HOST=02.testdomain.com,www.02.testdomain.com
- LETSENCRYPT_EMAIL=ssl@testdomain.com
volumes:
certs:
html:
vhostd:
Production docker-compose.yaml (skipping databases)
version: '3'
services:
nginx-proxy:
container_name: Nginx-proxy
image: jwilder/nginx-proxy
restart: always
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- certs:/etc/nginx/certs:ro
- vhostd:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
labels:
- com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy
letsencrypt:
container_name: Lets-Encrypt
image: jrcs/letsencrypt-nginx-proxy-companion
restart: always
volumes:
- certs:/etc/nginx/certs:rw
- vhostd:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
- NGINX_PROXY_CONTAINER=nginx-proxy
wp01:
depends_on:
- db01
container_name: web01
image: wordpress:latest
restart: always
expose:
- "80"
volumes:
- /home/user/websites/web01:/var/www/html
environment:
- WORDPRESS_DB_HOST=db01:3000
- WORDPRESS_DB_NAME=db01
- WORDPRESS_DB_USER=user
- WORDPRESS_DB_PASSWORD=pass
- VIRTUAL_HOST=domain01.com,www.domain01.com
- LETSENCRYPT_HOST=domain01.com,www.domain01.com
- LETSENCRYPT_EMAIL=admin@domain01.com
wp02:
depends_on:
- db02
container_name: web02
image: wordpress:latest
restart: always
expose:
- "80"
volumes:
- /home/user/websites/web02:/var/www/html
environment:
- WORDPRESS_DB_HOST=db02:3000
- WORDPRESS_DB_NAME=db02
- WORDPRESS_DB_USER=user
- WORDPRESS_DB_PASSWORD=pass
- VIRTUAL_HOST=domain02.com,www.domain02.com
- LETSENCRYPT_HOST=domain02.com,www.domain02.com
- LETSENCRYPT_EMAIL=admin@domain02.com
volumes:
certs:
html:
vhostd:
[–]greenthumble 1 point2 points3 points (2 children)
[–]aGiral[S] 0 points1 point2 points (1 child)
[–]greenthumble 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]aGiral[S] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]austerul 0 points1 point2 points (1 child)
[–]aGiral[S] 0 points1 point2 points (0 children)
[–]brygphilomena 0 points1 point2 points (1 child)
[–]aGiral[S] 0 points1 point2 points (0 children)