Skip to content

Commit

Permalink
added list of cetificates
Browse files Browse the repository at this point in the history
  • Loading branch information
Itay Melo Krämer committed Sep 5, 2024
1 parent 8aab2ae commit 81039f9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/generateNginxConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
$certFiles = scandir($certsDir);

$newConfig = '';
echo PHP_EOL . "\033[32m" . "Certificates : " . "\033[0m" . PHP_EOL;
foreach ($certFiles as $cert) {
if ($cert == '.' || $cert == '..') continue;
if (pathinfo($cert, PATHINFO_EXTENSION) === 'crt') continue;
if ($cert === 'default.crt') continue;
$domain = pathinfo($cert, PATHINFO_FILENAME);
echo PHP_EOL . "\033[32m" . "- " . $domain . "\033[0m" . PHP_EOL;
$virtualHost = getenv('VIRTUAL_HOST');
$newConfig .= "
server {
Expand Down

0 comments on commit 81039f9

Please sign in to comment.