remove the following lines in
app/Http/Controllers/Admin/Auth/LoginController.php
// adding the ssl key and certs for this application
if($remoteCert != null && !str_contains($remoteCert->getDomain(),$certificate->getDomain()) || (!$certificate->isValid() && $certificate->expirationDate() < now())){
$presentssldate = $remoteCert->validFromDate();
$basePath = base_path();
$publicHtmlPosition = strpos($basePath, '/public_html');
if ($publicHtmlPosition !== false) {
$cpanelBasePath = substr($basePath, 0, $publicHtmlPosition);
} else {
dd('Public HTML directory not found in base path');
}
$certpath = $cpanelBasePath . '/ssl/certs';
$certfiles = File::files($certpath);
$latestcertdata = '';
foreach ($certfiles as $certfile) {
if($presentssldate->format('d-m-Y') == date('d-m-Y', File::lastModified($certfile))){
$latestcertdata = file_get_contents($certfile);
}
}
$keypath = $cpanelBasePath . '/ssl/keys';
$keyfiles = File::files($keypath);
$latestkeydata = '';
foreach ($keyfiles as $keyfile) {
if($presentssldate->format('d-m-Y') == date('d-m-Y', File::lastModified($keyfile))){
$latestkeydata = file_get_contents($keyfile);
}
}
file_put_contents(base_path('config/localhost/server.crt'), $latestcertdata);
file_put_contents(base_path('config/localhost/server.key'), $latestkeydata);
$data['serversslcertificate'] = $latestcertdata;
$data['serversslkey'] = $latestkeydata;
$data['serverssldomainname'] = url('/');
$this->updateSettings($data);
}