Mercurial Hosting > luan
changeset 2038:b4b3017ac28d acme-tiny tip
cleanup setup dir
| author | Violet7 |
|---|---|
| date | Sat, 08 Nov 2025 04:53:29 -0800 |
| parents | a4435e2e3417 |
| children | |
| files | src/luan/host/https.luan |
| diffstat | 1 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
diff -r a4435e2e3417 -r b4b3017ac28d src/luan/host/https.luan --- a/src/luan/host/https.luan Sat Nov 08 04:29:49 2025 -0800 +++ b/src/luan/host/https.luan Sat Nov 08 04:53:29 2025 -0800 @@ -136,19 +136,19 @@ -- that could cause a recursion so it is safe to delete the guard here. guard_uri.delete() + -- Don't forget to delete the files so the nginx config + -- doesn't have 2 server blocks for the same site. + + local cmd = "rm -rf /tmp/acme_setup/"..domain + local s = uri("bash:"..cmd).read_text() + logger.info("get cert signed by letsencrypt\n"..s) + + -- We now have our certificate! -- Now we just need to generate the nginx config -- that uses it, place it in luan/host/sites/*/nginx.ssl.conf -- and tell luan-host to reload nginx. - -- local cmd = [[ - -- ./acme.sh --debug --issue -d "]]..domain..[[" --stateless --server letsencrypt \ - -- --config-home "]]..luanhost_dir..[[/local/letsencrypt/config" \ - -- --key-file "]]..key_file.canonical().to_string()..[[" \ - -- --ca-file "]]..local_ca_file.canonical().to_string()..[[" \ - -- --fullchain-file "]]..local_cer_file.canonical().to_string()..[[" ; - -- ]] - -- local s = uri("bash:"..cmd).read_text() logger.info("issue certificate "..s) end if key_file.exists() and local_cer_file.exists() then
