SSL更新の設定変更が反映されない

TOP Forums その他(Everything else KUSANAGI) SSL更新の設定変更が反映されない

SSL更新の設定変更が反映されない

Tagged: ,

Viewing 3 reply threads
  • Author
    Posts
    • #997
      shingorow
      Participant

        kusanagi ssl –email {email address}
        を使ってメールアドレスの更新を行おうとしましたがエラーが表示されました。
        ドキュメントルートの設定変更が反映されていないのが原因のようです。
        エラーの内容は下記のとおりです。

        /home/kusanagi/{profile}/DocumentRoot does not exist or is not a directory
        Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /tmp/tmpdg7ny441/log or re-run Certbot with -v for more details.
        Execution failed: certbot certonly --text --noninteractive --webroot -w /home/kusanagi/{profile}/DocumentRoot -d {domain} -m {email} --agree-tos
        Return code was 1
        Execution failed: env RENEWED_LINAGE=/etc/letsencrypt/live/{profile} /opt/kusanagi/bin/ct-submit.sh
        Return code was 1

        SSLの設定ファイルは変更済みです。
        /etc/letsencrypt/renewal/{profile}.conf

         # renew_before_expiry = 30 days
          2 version = 1.22.0
          3 archive_dir = /etc/letsencrypt/archive/{profile}
          4 cert = /etc/letsencrypt/live/{profile}/cert.pem
          5 privkey = /etc/letsencrypt/live/{profile}/privkey.pem
          6 chain = /etc/letsencrypt/live/{profile}/chain.pem
          7 fullchain = /etc/letsencrypt/live/{profile}/fullchain.pem
          8
          9 # Options used in the renewal process
         10 [renewalparams]
         11 account = aec40f3090d546af874b837533cd1b18
         12 authenticator = webroot
         13 webroot_path = /home/kusanagi/{profile}/{project root}/public,
         14 server = https://acme-v02.api.letsencrypt.org/directory
         15 [[webroot_map]]
         16 {domain} = /home/kusanagi/{profile}/{project root}/public

        サーバーはConoha VPSで、Laravel9を使用し、サブドメインで運用しています。
        kusanagi statusは以下の通り。

        Profile: {profile}
        FQDN: {domain}
        Type: lamp
        KUSANAGI Version 9.2.6-2.el8
        conoha
        
        *** (active) nginx : nginx121 ***
        * nginx.service - The NGINX HTTP and reverse proxy server
           Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled)
           Active: active (running) since Wed 2022-08-10 13:58:12 JST; 17min ago
        
        *** (inactive) httpd : httpd ***
        * httpd.service - The Apache HTTP Server
           Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
           Active: inactive (dead)
        
        *** (active) php : php81 ***
        * php-fpm.service - The PHP FastCGI Process Manager
           Loaded: loaded (/usr/lib/systemd/system/php-fpm.service; enabled; vendor preset: disabled)
           Active: active (running) since Wed 2022-08-10 13:43:47 JST; 32min ago
        
        *** (active) mariadb : mariadb10.5 ***
        * mariadb.service - MariaDB 10.5.16 database server
           Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
           Active: active (running) since Wed 2022-08-10 13:57:05 JST; 18min ago
        
        *** (inactive) psql :  ***
        
        *** (inactive) pgpool-II :  ***
        
        *** python ***
        Python 3.9.13
        
        *** ruby ***
        ruby is not installed.
        
        *** Cache status ***
        fcache off
        
        *** WAF ***
        off
        
        *** SELinux ***
        off

        また、SSL証明書の更新もできない状況となっています。
        よろしくお願い致します。

        • This topic was modified 1 year, 8 months ago by shingorow.
      • #999
        shingorow
        Participant

          ちなみに、2022年8月10日にyum updateでパッケージのアップデートは済んでおります。

        • #1000
          cloudy
          Participant

            shingorow さん、こんにちは。

            kusanagi status の情報をありがとうございます。
            KUSANAGI Version 9.2.6-2.el8 で lnmp 環境ですね。

            > /home/kusanagi/{profile}/DocumentRoot does not exist or is not a directory

            エラーに書いてあるとおり DocumentRoot がないもしくはディレクトリではないようですが、心当たりはありますでしょうか?
            原則として kusanagi コマンドは、DocumentRoot がディレクトリとして存在することが前提です。
            変更した場合の動作は保証されません。

            上記のメッセージは certbot コマンドが出力されているものと思われます。
            kusanagi ssl --email コマンドでは、DocumentRoot 配下に .well-known ディレクトリと認証用ファイルを設置し、Let’s Encrypt のサーバ側からアクセスして検証を行います。
            よって、nginx で設定した docroot と DocumentRoot が一致しないと、認証に失敗し SSL の設定ができません。
            また、単純に DocumentRoot の空ディレクトリを復旧させたとしても、SSL の設定は失敗すると思われます。

            そのうえで更新を試したい場合、laravel の public を DocumentRoot のシンボリックリンクに設定するなどの手段を考えた上で、nginx や let’s encrypt 設定ファイルの手当を行うなど試してみてください。
            上記にも記載したとおりディレクトリ構成を変更し各種設定を手動で変更されている場合、動作は保証されませんので案くらいしかお伝えできませんがご了承ください。

          • #1001
            shingorow
            Participant

              cloudyさん
              お返事ありがとうございます。
              kusanagi sslの場合、certbotのコンフィグファイルを使うわけでは無いのですね。
              確かに、Laraveを使う上でDocumentRootは削除しました。
              シンボリックリンクを試してみます。

          Viewing 3 reply threads
          • You must be logged in to reply to this topic.

          Next article

          フォーラムについて