Skip to content

Commit

Permalink
re-trigger vhost regeneration on tmp. ssl-redirect
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Kaufmann <[email protected]>
  • Loading branch information
d00p committed Mar 3, 2024
1 parent c5c04eb commit e06db3d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/Froxlor/Cron/Http/Apache.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
namespace Froxlor\Cron\Http;

use Froxlor\Cron\Http\Php\PhpInterface;
use Froxlor\Cron\TaskId;
use Froxlor\Customer\Customer;
use Froxlor\Database\Database;
use Froxlor\Domain\Domain;
Expand All @@ -36,6 +37,7 @@
use Froxlor\Http\Statistics;
use Froxlor\PhpHelper;
use Froxlor\Settings;
use Froxlor\System\Cronjob;
use Froxlor\System\Crypt;
use Froxlor\Validate\Validate;
use PDO;
Expand Down Expand Up @@ -133,6 +135,7 @@ public function createIpPort()
if (Settings::Get('system.le_froxlor_enabled') && ($this->froxlorVhostHasLetsEncryptCert() == false || $this->froxlorVhostLetsEncryptNeedsRenew())) {
$this->virtualhosts_data[$vhosts_filename] .= '# temp. disabled ssl-redirect due to Let\'s Encrypt certificate generation.' . PHP_EOL;
$is_redirect = false;
Cronjob::inserttask(TaskId::REBUILD_VHOST);
} else {
$_sslport = $this->checkAlternativeSslPort();

Expand Down
2 changes: 2 additions & 0 deletions lib/Froxlor/Cron/Http/LetsEncrypt/AcmeSh.php
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,8 @@ private static function runIssueFor($certrows = [])
self::runAcmeSh($certrow, $domains, $cronlog, $do_force);
} else {
$cronlog->logAction(FroxlorLogger::CRON_ACTION, LOG_WARNING, "Skipping Let's Encrypt generation for " . $certrow['domain'] . " due to an enabled ssl_redirect");
// we need another reconfigure in order to get the certificate
Cronjob::inserttask(TaskId::REBUILD_VHOST);
}
}
}
Expand Down

0 comments on commit e06db3d

Please sign in to comment.