fix(acme.sh) : full path and better commands and templates WIP
This commit is contained in:
parent
521f5b6be8
commit
783952a707
2 changed files with 5 additions and 5 deletions
|
@ -1,6 +1,6 @@
|
||||||
[<?=$this->e($user)?>]
|
[<?=$this->e($user)?>]
|
||||||
user = <?=$this->e($user)?>
|
user = <?=$this->e($user)?> #unix user
|
||||||
group = <?=$this->e($user)?>
|
group = <?=$this->e($user)?> #unix group
|
||||||
listen = /var/run/php-fpm-<?=$this->e($user)?>.sock
|
listen = /var/run/php-fpm-<?=$this->e($user)?>.sock
|
||||||
listen.owner = www-data
|
listen.owner = www-data
|
||||||
listen.group = www-data
|
listen.group = www-data
|
||||||
|
|
|
@ -157,9 +157,9 @@ function createNginxConfig($domain, $user, $herseUser, $hersePass)
|
||||||
}
|
}
|
||||||
$subDomain = preg_match('/.'.$_SERVER['maindomain'].'$/isU', $domain, $matches, PREG_OFFSET_CAPTURE, 0);
|
$subDomain = preg_match('/.'.$_SERVER['maindomain'].'$/isU', $domain, $matches, PREG_OFFSET_CAPTURE, 0);
|
||||||
if (!$subDomain) {
|
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('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 \
|
--cert-file /etc/letsencrypt/live/'.$domain.'/cert.pem \
|
||||||
--key-file /etc/letsencrypt/live/'.$domain.'/key.pem \
|
--key-file /etc/letsencrypt/live/'.$domain.'/key.pem \
|
||||||
--fullchain-file /etc/letsencrypt/live/'.$domain.'/fullchain.pem \
|
--fullchain-file /etc/letsencrypt/live/'.$domain.'/fullchain.pem \
|
||||||
|
@ -176,7 +176,7 @@ function createNginxConfig($domain, $user, $herseUser, $hersePass)
|
||||||
'user' => $user,
|
'user' => $user,
|
||||||
'herseUser' => $herseUser,
|
'herseUser' => $herseUser,
|
||||||
'hersePass' => $hersePass,
|
'hersePass' => $hersePass,
|
||||||
'subdomain' => $subDomain,
|
'subDomain' => $subDomain,
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue