Sorry for the late reply,
how sure are we that this is a problem with the http->https redirect, i just tried it on my test machine and i worked:
$ more /etc/apache2/sites-enabled/univention-keycloak.conf
...
<VirtualHost *:80>
ServerName auth-test...
Redirect permanent / https://auth-test...
</VirtualHost>
</IfModule>
$ curl http://auth-test...
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="https://auth-test...">here</a>.</p>
<hr>
<address>Apache/2.4.38 (Univention) Server at auth-test... Port 80</address>
</body></html>
$ sudo -u letsencrypt /usr/share/univention-letsencrypt/refresh-cert
+ DIR_LE=/etc/univention/letsencrypt
++ id -un
+ '[' '!' letsencrypt = letsencrypt ']'
+ trap cleanup EXIT
++ mktemp --tmpdir=/etc/univention/letsencrypt
+ TMPFN=/etc/univention/letsencrypt/tmp.QICJFP7Vku
+ date
Do 15. Feb 14:37:29 CET 2024
+ echo 'Refreshing certificate for following domains:'
Refreshing certificate for following domains:
+ cat /etc/univention/letsencrypt/domains
auth-test... portal-test...
+ is_ucr_true letsencrypt/staging
+ local value
++ /usr/sbin/univention-config-registry get letsencrypt/staging
+ value=
+ case "$(echo -n "$value" | tr '[:upper:]' '[:lower:]')" in
++ echo -n ''
++ tr '[:upper:]' '[:lower:]'
+ return 2
+ /usr/share/univention-letsencrypt/acme_tiny.py --disable-check --account-key /etc/univention/letsencrypt/account.key --csr /etc/univention/letsencrypt/domain.csr --acme-dir /var/www/.well-known/acme-challenge/
Parsing account key...
Parsing CSR...
Found domains: auth-test..., portal-test...
Getting directory...
Directory found!
Registering account...
Already registered!
Creating new order...
Order created!
Verifying auth-test......
auth-test... verified!
Verifying portal-test...
portal-test... verified!
Signing certificate...
Certificate signed!
+ is_ucr_true letsencrypt/staging
+ local value
++ /usr/sbin/univention-config-registry get letsencrypt/staging
+ value=
+ case "$(echo -n "$value" | tr '[:upper:]' '[:lower:]')" in
++ echo -n ''
++ tr '[:upper:]' '[:lower:]'
+ return 2
+ mv -f /etc/univention/letsencrypt/tmp.QICJFP7Vku /etc/univention/letsencrypt/signed_chain.crt
+ chmod 0644 /etc/univention/letsencrypt/signed_chain.crt
++ date +%Y%m%d-%H%M%S
+ cp /etc/univention/letsencrypt/signed_chain.crt /etc/univention/letsencrypt/signed_chain.crt_20240215-143739
++ date
+ echo 'Certificate refreshed at Do 15. Feb 14:37:39 CET 2024'
Certificate refreshed at Do 15. Feb 14:37:39 CET 2024
Regards,
Felix