From 13c729a625d931a0c83d449c238c3565a74bf869 Mon Sep 17 00:00:00 2001 From: Bozhidar Date: Mon, 5 Aug 2024 14:51:34 +0300 Subject: [PATCH] Update Domain.php --- web/app/Models/Domain.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/web/app/Models/Domain.php b/web/app/Models/Domain.php index 8b362e0..ac4f6ff 100644 --- a/web/app/Models/Domain.php +++ b/web/app/Models/Domain.php @@ -406,12 +406,14 @@ class Domain extends Model // } } - $apacheVirtualHostBuilder->setPort(443); - $apacheVirtualHostBuilder->setSSLCertificateFile($sslCertificateFile); - $apacheVirtualHostBuilder->setSSLCertificateKeyFile($sslCertificateKeyFile); - $apacheVirtualHostBuilder->setSSLCertificateChainFile($sslCertificateChainFile); + if (is_file($sslCertificateFile)) { + $apacheVirtualHostBuilder->setPort(443); + $apacheVirtualHostBuilder->setSSLCertificateFile($sslCertificateFile); + $apacheVirtualHostBuilder->setSSLCertificateKeyFile($sslCertificateKeyFile); + $apacheVirtualHostBuilder->setSSLCertificateChainFile($sslCertificateChainFile); - $virtualHostSettingsWithSSL = $apacheVirtualHostBuilder->getSettings(); + $virtualHostSettingsWithSSL = $apacheVirtualHostBuilder->getSettings(); + } }