diff --git a/app/workers/certificates.php b/app/workers/certificates.php index 7a4719aec9..d8d5a98707 100644 --- a/app/workers/certificates.php +++ b/app/workers/certificates.php @@ -334,11 +334,12 @@ class CertificatesV1 extends Worker throw new Exception('Failed to rename certificate privkey.pem.'); } - $config = - "tls:" . - " certificates:" . - " - certFile: /storage/certificates/{$domain}/fullchain.pem" . - " keyFile: /storage/certificates/{$domain}/privkey.pem"; + $config = \implode('\n', [ + "tls:", + " certificates:", + " - certFile: /storage/certificates/{$domain}/fullchain.pem", + " keyFile: /storage/certificates/{$domain}/privkey.pem" + ]); // Save configuration into Traefik using our new cert files if (!\file_put_contents(APP_STORAGE_CONFIG . '/' . $domain . '.yml', $config)) {