From 783952a70738fc16bdcb9aa2c805cc121cbbc9e8 Mon Sep 17 00:00:00 2001 From: mrflos Date: Wed, 7 Sep 2022 09:57:53 +0300 Subject: [PATCH] fix(acme.sh) : full path and better commands and templates WIP --- templates/php-fpm.php | 4 ++-- utils.inc.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/templates/php-fpm.php b/templates/php-fpm.php index 082e5d2..98133f9 100644 --- a/templates/php-fpm.php +++ b/templates/php-fpm.php @@ -1,6 +1,6 @@ [e($user)?>] -user = e($user)?> -group = e($user)?> +user = e($user)?> #unix user +group = e($user)?> #unix group listen = /var/run/php-fpm-e($user)?>.sock listen.owner = www-data listen.group = www-data diff --git a/utils.inc.php b/utils.inc.php index b7f958f..1fad48f 100644 --- a/utils.inc.php +++ b/utils.inc.php @@ -157,9 +157,9 @@ function createNginxConfig($domain, $user, $herseUser, $hersePass) } $subDomain = preg_match('/.'.$_SERVER['maindomain'].'$/isU', $domain, $matches, PREG_OFFSET_CAPTURE, 0); if (!$subDomain) { - exec('acme.sh --issue -d '.$domain.' -d www.'.$domain.' -k ec-384 -w /home/'.$user.'/'.$domain, $output); + exec('/root/.acme.sh/acme.sh --issue -d '.$domain.' -d www.'.$domain.' -k ec-384 --nginx', $output); exec('mkdir -p /etc/letsencrypt/live/'.$domain, $output); - exec('acme.sh --install-cert -d '.$domain.' --ecc \ + exec('/root/.acme.sh/acme.sh --install-cert -d '.$domain.' --ecc \ --cert-file /etc/letsencrypt/live/'.$domain.'/cert.pem \ --key-file /etc/letsencrypt/live/'.$domain.'/key.pem \ --fullchain-file /etc/letsencrypt/live/'.$domain.'/fullchain.pem \ @@ -176,7 +176,7 @@ function createNginxConfig($domain, $user, $herseUser, $hersePass) 'user' => $user, 'herseUser' => $herseUser, 'hersePass' => $hersePass, - 'subdomain' => $subDomain, + 'subDomain' => $subDomain, ] ) );