SSL_ERROR Certificate problem

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

Please completely fill out the help topic template as per the forum rules. You skipping sections such as your logs, and you didn’t use proper formatting so your config is difficult to read. The template includes instructions which it seems you removed.

I am a beginner, so I searched many websites and learned a lot. In the end, I found a solution in the forum’s wiki. Adding “php_fastcgi unix//run/php/php-version-fpm. sock” to the Caddyfile under the site section resolved the redirect issue. This is probably because the second WordPress container was redirecting to the first WordPress container for access.thank you!

example.com {
    reverse_proxy wp2
	root * /var/www/wordpress
	encode gzip
	php_fastcgi unix//run/php/php-version-fpm.sock
	file_server
}

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.