O.k. after setting $_SERVER['HTTPS']='on';
everything worked, then this post showed me the right direction: caddy-behind-a-reverse-proxy-use-wrong-x-forwarded-proto. So I added after php_fastcgi unix//run/php/php8.2-fpm.sock
{
trusted_proxies private_ranges
}
and my Caddy file looks like this now.
http://shiatsu.example.com {
root * /var/www/wordpress
php_fastcgi unix//run/php/php8.2-fpm.sock {
trusted_proxies private_ranges
}
file_server
encode gzip
@disallowed {
path /xmlrpc.php
path *.sql
path /wp-content/uploads/*.php
}
rewrite @disallowed '/index.php'
}
This solved the issue. It would be nice, if somebody could make a wiki entry out of it (I’m not allowed…)