1. The problem I’m having:
I would like Caddy to assist me in reverse proxying two domain names to two separate WordPress containers. However, currently, one domain is accessible while the other displays an “ERR_SSL_PROTOCOL_ERROR.”
My assumptions:
1.The applied SSL certificate might be incorrect.
2.The carried certificate during forwarding might be incorrect.
Actions I’ve taken:
1.I attempted to reconfigure a domain, bg.example.com, to point to both WP1 and WP2, but both resulted in an SSL_ERROR.
2.I tried the IP:PORT approach, but encountered the same SSL_ERROR.
3.I modified ai.example.com to point to either WP1 or WP2, and both were accessible.
4.Upon using the ping command, all three domain names returned the same IP address.
5.I’ve checked the caddy_data directory and found three certificate files present. I’ve deleted them before and also tried restarting, but it didn’t work.
2. Caddy version:
2.7.4
3. How I installed and ran Caddy:
Docker Compose
4. System environment:
architecture:s390x
5. My complete Caddy config:
{
admin off
}
ai.example.com {
reverse_proxy wp2
root * /var/www/html
}
blog.example.com {
reverse_proxy wp1
root * /var/www/html
}
bg.example.com {
reverse_proxy 127.0.0.1:4001
root * /var/www/html
}
import /etc/caddy/conf.d/*.conf
6. Service/unit/compose file:
services:
caddy:
image: caddy
container_name: caddy
restart: unless-stopped
ports:
- “80:80”
- “443:443”
- “443:443/udp”
volumes:
- ./caddy/Caddyfile:/etc/caddy/Caddyfile
- ./caddy/site:/srv
- ./caddy/caddy_data:/data
- ./caddy/caddy_config:/config