質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
セキュリティー

このタグは、コンピューターシステムの安全性やデータの機密性に関連したトピックの為に使われます。

Q&A

解決済

3回答

3575閲覧

Lets'Encryptの証明書が期限切れになっていたので作り直したいのですがよくわかりません。

退会済みユーザー

退会済みユーザー

総合スコア0

セキュリティー

このタグは、コンピューターシステムの安全性やデータの機密性に関連したトピックの為に使われます。

0グッド

0クリップ

投稿2017/10/03 05:59

編集2017/10/06 05:07

Lets'Encryptの証明書が期限切れになっていたので作り直したいのですがよくわかりません。

System32/acme.sh-master$ sudo sudo: ホスト DESKTOP- の名前解決ができません [2017年 10月 6日 金曜日 13:38:11 DST] _saved_account_key_hash is not changed, skip register account. [2017年 10月 6日 金曜日 13:38:11 DST] Read key length: [2017年 10月 6日 金曜日 13:38:11 DST] _createcsr [2017年 10月 6日 金曜日 13:38:11 DST] Single domain='my' [2017年 10月 6日 金曜日 13:38:12 DST] Getting domain auth token for each domain [2017年 10月 6日 金曜日 13:38:12 DST] Getting webroot for domain='my' [2017年 10月 6日 金曜日 13:38:12 DST] _w='/httpdocs' [2017年 10月 6日 金曜日 13:38:12 DST] _currentRoot='/httpdocs' [2017年 10月 6日 金曜日 13:38:12 DST] Getting new-authz for domain='my' [2017年 10月 6日 金曜日 13:38:12 DST] _init api for server: https://acme-v01.api.letsencrypt.org/directory [2017年 10月 6日 金曜日 13:38:12 DST] ACME_KEY_CHANGE='https://acme-v01.api.letsencrypt.org/acme/key-change' [2017年 10月 6日 金曜日 13:38:12 DST] ACME_NEW_AUTHZ='https://acme-v01.api.letsencrypt.org/acme/new-authz' [2017年 10月 6日 金曜日 13:38:12 DST] ACME_NEW_ORDER='https://acme-v01.api.letsencrypt.org/acme/new-cert' [2017年 10月 6日 金曜日 13:38:12 DST] ACME_NEW_ACCOUNT='https://acme-v01.api.letsencrypt.org/acme/new-reg' [2017年 10月 6日 金曜日 13:38:12 DST] ACME_REVOKE_CERT='https://acme-v01.api.letsencrypt.org/acme/revoke-cert' [2017年 10月 6日 金曜日 13:38:12 DST] Try new-authz for the 0 time. [2017年 10月 6日 金曜日 13:38:13 DST] url='https://acme-v01.api.letsencrypt.org/acme/new-authz' [2017年 10月 6日 金曜日 13:38:13 DST] payload='{"resource": "new-authz", "identifier": {"type": "dns", "value": "my"}}' [2017年 10月 6日 金曜日 13:38:13 DST] RSA key [2017年 10月 6日 金曜日 13:38:13 DST] GET [2017年 10月 6日 金曜日 13:38:13 DST] url='https://acme-v01.api.letsencrypt.org/directory' [2017年 10月 6日 金曜日 13:38:13 DST] timeout [2017年 10月 6日 金曜日 13:38:14 DST] _CURL='curl -L --silent --dump-header /home/centos5/.acme.sh/http.header ' [2017年 10月 6日 金曜日 13:38:15 DST] ret='0' [2017年 10月 6日 金曜日 13:38:16 DST] POST [2017年 10月 6日 金曜日 13:38:16 DST] url='https://acme-v01.api.letsencrypt.org/acme/new-authz' [2017年 10月 6日 金曜日 13:38:16 DST] _CURL='curl -L --silent --dump-header /home/centos5/.acme.sh/http.header ' [2017年 10月 6日 金曜日 13:38:18 DST] _ret='0' [2017年 10月 6日 金曜日 13:38:18 DST] code='201' [2017年 10月 6日 金曜日 13:38:18 DST] The new-authz request is ok. [2017年 10月 6日 金曜日 13:38:19 DST] entry='"type":"http-01","status":"pending","uri":"https://acme-v01.api.letsencrypt.org/acme/challenge/kvz2WXktlGlpTAd3NcBvLORbrfnCQ9MolLze2yqISHY/2140608473","token":"gHdiFB0Vla0rBJqxZdu23_cV5GU6MyxVXCVNsQA7fuE"' [2017年 10月 6日 金曜日 13:38:19 DST] token='gHdiFB0Vla0rBJqxZdu23_cV5GU6MyxVXCVNsQA7fuE' [2017年 10月 6日 金曜日 13:38:19 DST] uri='https://acme-v01.api.letsencrypt.org/acme/challenge/kvz2WXktlGlpTAd3NcBvLORbrfnCQ9MolLze2yqISHY/2140608473' [2017年 10月 6日 金曜日 13:38:19 DST] keyauthorization='gHdiFB0Vla0rBJqxZdu23_cV5GU6MyxVXCVNsQA7fuE.YYJDauP9fxZ7aYxEQlSfVna-U60PIm2oQNznLof7Ozc' [2017年 10月 6日 金曜日 13:38:19 DST] dvlist='my#gHdiFB0Vla0rBJqxZdu23_cV5GU6MyxVXCVNsQA7fuE.YYJDauP9fxZ7aYxEQlSfVna-U60PIm2oQNznLof7Ozc#https://acme-v01.api.letsencrypt.org/acme/challenge/kvz2WXktlGlpTAd3NcBvLORbrfnCQ9MolLze2yqISHY/2140608473#http-01#/httpdocs' [2017年 10月 6日 金曜日 13:38:19 DST] vlist='my#gHdiFB0Vla0rBJqxZdu23_cV5GU6MyxVXCVNsQA7fuE.YYJDauP9fxZ7aYxEQlSfVna-U60PIm2oQNznLof7Ozc#https://acme-v01.api.letsencrypt.org/acme/challenge/kvz2WXktlGlpTAd3NcBvLORbrfnCQ9MolLze2yqISHY/2140608473#http-01#/httpdocs,' [2017年 10月 6日 金曜日 13:38:19 DST] ok, let's start to verify [2017年 10月 6日 金曜日 13:38:20 DST] Verifying:my [2017年 10月 6日 金曜日 13:38:20 DST] d='my' [2017年 10月 6日 金曜日 13:38:20 DST] keyauthorization='gHdiFB0Vla0rBJqxZdu23_cV5GU6MyxVXCVNsQA7fuE.YYJDauP9fxZ7aYxEQlSfVna-U60PIm2oQNznLof7Ozc' [2017年 10月 6日 金曜日 13:38:20 DST] uri='https://acme-v01.api.letsencrypt.org/acme/challenge/kvz2WXktlGlpTAd3NcBvLORbrfnCQ9MolLze2yqISHY/2140608473' [2017年 10月 6日 金曜日 13:38:20 DST] _currentRoot='/httpdocs' [2017年 10月 6日 金曜日 13:38:20 DST] wellknown_path='/httpdocs/.well-known/acme-challenge' [2017年 10月 6日 金曜日 13:38:20 DST] writing token:gHdiFB0Vla0rBJqxZdu23_cV5GU6MyxVXCVNsQA7fuE to /httpdocs/.well-known/acme-challenge/gHdiFB0Vla0rBJqxZdu23_cV5GU6MyxVXCVNsQA7fuE [2017年 10月 6日 金曜日 13:38:20 DST] Changing owner/group of .well-known to root:root [2017年 10月 6日 金曜日 13:38:20 DST] url='https://acme-v01.api.letsencrypt.org/acme/challenge/kvz2WXktlGlpTAd3NcBvLORbrfnCQ9MolLze2yqISHY/2140608473' [2017年 10月 6日 金曜日 13:38:20 DST] payload='{"resource": "challenge", "keyAuthorization": "gHdiFB0Vla0rBJqxZdu23_cV5GU6MyxVXCVNsQA7fuE.YYJDauP9fxZ7aYxEQlSfVna-U60PIm2oQNznLof7Ozc"}' [2017年 10月 6日 金曜日 13:38:21 DST] POST [2017年 10月 6日 金曜日 13:38:21 DST] url='https://acme-v01.api.letsencrypt.org/acme/challenge/kvz2WXktlGlpTAd3NcBvLORbrfnCQ9MolLze2yqISHY/2140608473' [2017年 10月 6日 金曜日 13:38:21 DST] _CURL='curl -L --silent --dump-header /home/centos5/.acme.sh/http.header ' [2017年 10月 6日 金曜日 13:38:22 DST] _ret='0' [2017年 10月 6日 金曜日 13:38:22 DST] code='202' [2017年 10月 6日 金曜日 13:38:22 DST] sleep 2 secs to verify [2017年 10月 6日 金曜日 13:38:25 DST] checking [2017年 10月 6日 金曜日 13:38:25 DST] GET [2017年 10月 6日 金曜日 13:38:25 DST] url='https://acme-v01.api.letsencrypt.org/acme/challenge/kvz2WXktlGlpTAd3NcBvLORbrfnCQ9MolLze2yqISHY/2140608473' [2017年 10月 6日 金曜日 13:38:25 DST] timeout [2017年 10月 6日 金曜日 13:38:25 DST] _CURL='curl -L --silent --dump-header /home/centos5/.acme.sh/http.header ' [2017年 10月 6日 金曜日 13:38:25 DST] ret='0' [2017年 10月 6日 金曜日 13:38:26 DST] my:Verify error:Invalid response from http://my/.well-known/acme-challenge/gHdiFB0Vla0rBJqxZdu23_cV5GU6MyxVXCVNsQA7fuE: [2017年 10月 6日 金曜日 13:38:26 DST] Debug: get token url. [2017年 10月 6日 金曜日 13:38:26 DST] GET [2017年 10月 6日 金曜日 13:38:26 DST] url='http://my/.well-known/acme-challenge/gHdiFB0Vla0rBJqxZdu23_cV5GU6MyxVXCVNsQA7fuE' [2017年 10月 6日 金曜日 13:38:26 DST] timeout='1' [2017年 10月 6日 金曜日 13:38:26 DST] _CURL='curl -L --silent --dump-header /home/centos5/.acme.sh/http.header --connect-timeout 1' <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>404 Not Found</title> </head><body> <h1>Not Found</h1> <p>The requested URL /.well-known/acme-challenge/gHdiFB0Vla0rBJqxZdu23_cV5GU6MyxVXCVNsQA7fuE was not found on this server.</p> <hr> <address>Apache Server at my Port 80</address> </body></html> [2017年 10月 6日 金曜日 13:38:27 DST] ret='0' [2017年 10月 6日 金曜日 13:38:27 DST] Debugging, skip removing: /httpdocs/.well-known/acme-challenge/gHdiFB0Vla0rBJqxZdu23_cV5GU6MyxVXCVNsQA7fuE [2017年 10月 6日 金曜日 13:38:27 DST] pid [2017年 10月 6日 金曜日 13:38:27 DST] No need to restore nginx, skip. [2017年 10月 6日 金曜日 13:38:27 DST] _clearupdns [2017年 10月 6日 金曜日 13:38:27 DST] skip dns. [2017年 10月 6日 金曜日 13:38:27 DST] _on_issue_err [2017年 10月 6日 金曜日 13:38:27 DST] Please add '--debug' or '--log' to check more details. [2017年 10月 6日 金曜日 13:38:27 DST] See: https://github.com/Neilpang/acme.sh/wiki/How-to-debug-acme.sh [2017年 10月 6日 金曜日 13:38:27 DST] url='https://acme-v01.api.letsencrypt.org/acme/challenge/kvz2WXktlGlpTAd3NcBvLORbrfnCQ9MolLze2yqISHY/2140608473' [2017年 10月 6日 金曜日 13:38:27 DST] payload='{"resource": "challenge", "keyAuthorization": "gHdiFB0Vla0rBJqxZdu23_cV5GU6MyxVXCVNsQA7fuE.YYJDauP9fxZ7aYxEQlSfVna-U60PIm2oQNznLof7Ozc"}' [2017年 10月 6日 金曜日 13:38:28 DST] POST [2017年 10月 6日 金曜日 13:38:28 DST] url='https://acme-v01.api.letsencrypt.org/acme/challenge/kvz2WXktlGlpTAd3NcBvLORbrfnCQ9MolLze2yqISHY/2140608473' [2017年 10月 6日 金曜日 13:38:28 DST] _CURL='curl -L --silent --dump-header /home/centos5/.acme.sh/http.header ' [2017年 10月 6日 金曜日 13:38:29 DST] _ret='0' [2017年 10月 6日 金曜日 13:38:30 DST] code='400' [2017年 10月 6日 金曜日 13:38:30 DST] socat doesn't exists. [2017年 10月 6日 金曜日 13:38:30 DST] Diagnosis versions: openssl:openssl OpenSSL 1.0.1f 6 Jan 2014 apache: apache doesn't exists. nginx: nginx doesn't exists. socat:

まだエラーが出ますね。
もう疲れたと思いますが、お願いいたします。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答3

0

投稿2017/10/07 09:41

satena

総合スコア109

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

退会済みユーザー

退会済みユーザー

2017/10/08 06:08

GUIでもできるようになったのですね。 ただこちらは更新ではなくはじめから行うのですよね。 更新がクライアントPC上でできるといいのですがね
guest

0

これで、更新された証明書がWindowsPCにできるかもですね。
./certbot-auto certonly --manual -d ドメイン名

投稿2017/10/07 15:29

scsi

総合スコア2840

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

退会済みユーザー

退会済みユーザー

2017/10/08 05:48

ありがとうございます。 System32/acme.sh-master$ ./certbot-auto certonly --manual -d mysite bash: ./certbot-auto: そのようなファイルやディレクトリはありません centos5@DESKTOP:/mnt/c/Windows/System32/acme.sh-master$ cd ../ centos5@DESKTOP:/mnt/c/Windows/System32$ ./certbot-auto certonly --manual -d mysite Upgrading certbot-auto 0.15.0 to 0.19.0... Replacing certbot-auto... sudo: ホスト DESKTOP の名前解決ができません [sudo] password for centos5: sudo: ホスト DESKTOP の名前解決ができません sudo: ホスト DESKTOP の名前解決ができません mv: デバイス間移動失敗: `/tmp/tmp.ukJrYqUbLg/letsencrypt-auto.permission-clone' から `./certbot-auto' 。移動先を削除できません: 許可がありません このようになりました。
退会済みユーザー

退会済みユーザー

2017/10/08 23:17

お時間のある時に教えて頂ければ幸いです。
scsi

2017/10/08 23:37

これでできないのであれば、これ以上のサポートは無理ですね。
guest

0

ベストアンサー

/mnt/c/Windows/System32$./certbot-auto certonly --manual

このようにやったので恐らくcertbotはsystem32にありそうなのですが、
下記のようにやりましたがうまくいきません

./ で指定しているので、 /mnt/c/Windows/System32 の直下にあるはずです。
もう一度確認してもらえますか。
おそらく、パスが通ってないので、そこに cd するか、フルパスで指定しないと動かないのではないでしょうか?以下で起動できませんか。

/mnt/c/Windows/System32/certbot-auto certonly -d ikenie3.org,www.ikenie3.org,blog.ikenie3.org

これで、「コマンドが見つかりません」となるようであれば、ファイルがなくなったと思われます。Windows のフォルダをマウントされているようですので、マウントしているマシンが違うとかウィルス除去ソフトに消されたとかいう可能性はないでしょうか?

投稿2017/10/03 08:01

mit0223

総合スコア3401

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

退会済みユーザー

退会済みユーザー

2017/10/03 08:07

ありがとうございます。 :/mnt/c# /mnt/c/Windows/System32/certbot-auto certonly -d ikenie3.org,www.ikenie3.org,blog.ikenie3.org Upgrading certbot-auto 0.15.0 to 0.18.2... Replacing certbot-auto... mv: デバイス間移動失敗: `/tmp/tmp.uwaykQWqy0/letsencrypt-auto.permission-clone' から `/mnt/c/Windows/System32/certbot-auto' 。移動先を削除できません: 許可がありません と出ました、System32の中にcertbot-autoがあるのは間違いないのですね。 あとはどうやって更新作業をするかですね。
mit0223

2017/10/03 08:20

自分自身が古いのでバージョンアップしようとしているようですね。 Windows からマウントしたディレクトリで実行しているので、書き換えに失敗しているようです。 マウント先から起動するのではなく、/usr/bin とかにコピーされてはどうでしょうか? # cp /mnt/c/Windows/System32/certbot-auto /usr/bin # certbot-auto certonly -d ikenie3.org,www.ikenie3.org,blog.ikenie3.org
退会済みユーザー

退会済みユーザー

2017/10/03 09:00

/mnt/c/Windows/System32# certbot-auto certonly -d ikenie3.org,www.ikenie3.org,blog.ikenie3.org Upgrading certbot-auto 0.15.0 to 0.18.2... Replacing certbot-auto... Creating virtual environment... Installing Python packages... Installation succeeded. Traceback (most recent call last): File "/opt/eff.org/certbot/venv/bin/letsencrypt", line 7, in <module> from certbot.main import main File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/main.py", line 9, in <module> from acme import jose File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/acme/jose/__init__.py", line 37, in <module> from acme.jose.interfaces import JSONDeSerializable File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/acme/jose/interfaces.py", line 9, in <module> from acme.jose import util File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/acme/jose/util.py", line 5, in <module> import OpenSSL File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/OpenSSL/__init__.py", line 8, in <module> from OpenSSL import rand, crypto, SSL File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/OpenSSL/rand.py", line 12, in <module> from OpenSSL._util import ( File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/OpenSSL/_util.py", line 6, in <module> from cryptography.hazmat.bindings.openssl.binding import Binding File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 13, in <module> from cryptography.hazmat.bindings._openssl import ffi, lib ImportError: /opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/cryptography/hazmat/bindings/_openssl.so: cannot enable executable stack as shared object requires: Invalid argument ありがとうございます。 このようになりましたがどうもこれだけで更新が出来るわけではなさそうですね。 検索してみます。
退会済みユーザー

退会済みユーザー

2017/10/03 09:50 編集

System32# sudo certbot-auto renew --post-hook "sudo service httpd restart" sudo: ホスト の名前解決ができません Error: couldn't get currently installed version for /opt/eff.org/certbot/venv/bin/letsencrypt: Traceback (most recent call last): File "/opt/eff.org/certbot/venv/bin/letsencrypt", line 7, in <module> from certbot.main import main File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/main.py", line 9, in <module> from acme import jose File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/acme/jose/__init__.py", line 37, in <module> from acme.jose.interfaces import JSONDeSerializable File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/acme/jose/interfaces.py", line 9, in <module> from acme.jose import util File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/acme/jose/util.py", line 5, in <module> import OpenSSL File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/OpenSSL/__init__.py", line 8, in <module> from OpenSSL import rand, crypto, SSL File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/OpenSSL/rand.py", line 12, in <module> from OpenSSL._util import ( File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/OpenSSL/_util.py", line 6, in <module> from cryptography.hazmat.bindings.openssl.binding import Binding File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 13, in <module> from cryptography.hazmat.bindings._openssl import ffi, lib ImportError: /opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/cryptography/hazmat/bindings/_openssl.so: cannot enable executable stack as shared object requires: Invalid argument その後このように更新を試みましたがやはりうまくいきません。
mit0223

2017/10/03 09:21

質問に OS のバージョンと certbot のインストール方法を追記してもらえますか。
退会済みユーザー

退会済みユーザー

2017/10/03 09:33

osはwindows10 64bitです。
退会済みユーザー

退会済みユーザー

2017/10/03 09:37

恐らく ./mnt/c/Windows/System32$./certbot-auto certonly --manual Bootstrapping dependencies for Debian-based OSes... (you can skip this with --no-bootstrap) がインストールした際のログかと思うのですが随分と前なので正直はっきりとは覚えていません。 すいません。 CUIでやったことは覚えていますがこれでなければ再度探します。
mit0223

2017/10/03 09:47

Bash On Windows というやつでしょうか?それであれば、残念ながら暗号化の問題で今はインストールできないようです。 https://github.com/certbot/certbot/issues/5144 ここに提案されているとおり、Docker などを導入して、コンテナ内で証明書を取るしかないのではないでしょうか。
退会済みユーザー

退会済みユーザー

2017/10/03 09:52

そうです。 Bash On Windows だと思います。 windows10でシェルが使えると聞いてインストールしたのですが、最近この件では使えなくなったのですか? 仮想ソフトのようなものでOSをインストールしてやらないといけないのでしょうか? 新規でも同じなのですかね。 あまりに大変ですがDOSでも出来ないのでしょうか?
mit0223

2017/10/03 10:28

先の github では acme.sh というのをおすすめされています。 https://github.com/Neilpang/acme.sh certbot のかわりにこのスクリプトを試されてはいかがでしょうか。
退会済みユーザー

退会済みユーザー

2017/10/03 11:44

ご丁寧にありがとうございます。 acme.shをwindow10にインストールして、bashの代わりに使うという事ですね、
mit0223

2017/10/03 14:31

acme.sh も Bash On Windows が必要だと思います。 certbot のかわりに acme.sh を試してみてください。
退会済みユーザー

退会済みユーザー

2017/10/04 02:14

acme.shというファイルをgitからダウンロードしたのですが、実行しても、黒い画面が一瞬出るだけです。これを使って https://mag.torumade.nu/?p=14464 のように行えばいいのでしょうか?
退会済みユーザー

退会済みユーザー

2017/10/04 02:36

acme.sh-masterというフォルダをダウンロードしたところをカレントディレクトリとして、 acme.sh certonly -d ikenie3.org,www.ikenie3.org,blog.ikenie3.org と打てば自動的に更新されるのでしょうか?
mit0223

2017/10/04 04:56

acme.sh を Bash on Windows の中で実行してください。ダウンロードしたところをカレントディレクトリとするのであれば、以下のように実行してみてください。(最初の ./ が無いとコマンドが見つかりません) ./acme.sh --issue -d ikenie3.org,www.ikenie3.org,blog.ikenie3.org -w Webサーバのドキュメントルート
退会済みユーザー

退会済みユーザー

2017/10/04 05:01

初歩的な質問で大変恐縮ですが、実行とは下記ではないのでしょうか? /mnt/c/Windows/System32/acme.sh-master# ./acme.sh https://github.com/Neilpang/acme.sh v2.7.4 Usage: acme.sh command ...[parameters].... Commands: --help, -h Show this help message. --version, -v Show version info. --install Install acme.sh to your system. --uninstall Uninstall acme.sh, and uninstall the cron job. --upgrade Upgrade acme.sh to the latest code from https://github.com/Neilpang/acme.sh. --issue Issue a cert. --signcsr Issue a cert from an existing csr. --deploy Deploy the cert to your server. --install-cert Install the issued cert to apache/nginx or any other server. --renew, -r Renew a cert. --renew-all Renew all the certs. --revoke Revoke a cert. --remove Remove the cert from https://github.com/Neilpang/acme.sh --list List all the certs. --showcsr Show the content of a csr. --install-cronjob Install the cron job to renew certs, you don't need to call this. The 'install' command can automatically install the cron job. --uninstall-cronjob Uninstall the cron job. The 'uninstall' command can do this automatically. --cron Run cron job to renew all the certs. --toPkcs Export the certificate and key to a pfx file. --toPkcs8 Convert to pkcs8 format. --update-account Update account info. --register-account Register account key. --deactivate-account Deactivate the account. --create-account-key Create an account private key, professional use. --create-domain-key Create an domain private key, professional use. --createCSR, -ccsr Create CSR , professional use. --deactivate Deactivate the domain authz, professional use.
mit0223

2017/10/04 05:16

はい、実行できてますが、引数を指定していないので、ヘルプが表示されています。証明書の発行を指示する --issue を指定し、 -d でドメイン名、 -w でWebサーバのドキュメントルートを指定してください。
退会済みユーザー

退会済みユーザー

2017/10/04 05:57

"remote_path": "/httpdocs" となっているので、ドキュメントルートとはこちらでいいのでしょうか? 下記のようになりますか? ./acme.sh --issue -d ikenie3.org,www.ikenie3.org,blog.ikenie3.org -w /httpdocs 初心者なので色々とすいません。
mit0223

2017/10/04 07:07

インターネットから http://www.ikenie3.org にアクセスして、 /httpdocs の下においたファイルが見えているのであれば、その指定で正しいです。 let's encrypt はその下にファイルを作ってみて、インターネットからアクセスしてみることで、 DNS に正規に登録されているドメインであることを確認します。
退会済みユーザー

退会済みユーザー

2017/10/04 07:23

ありがとうございます。 公開されているサイトです 見れるとは誰でもアクセス出来るかと言うことでしょうか?
退会済みユーザー

退会済みユーザー

2017/10/04 07:28

それにしても、サイトのドメイン名がわからなのにどうやってどのサイトか理解できるのですかね。 更新なので前の情報が残っているからですかね?
mit0223

2017/10/04 07:49

acme.sh は Let's Encrypt のサーバと会話して証明書を取得します。ドメイン名は -d に指定しているので、そのドメイン名がサーバに伝えられます。サーバは、そのドメイン名で公式のDNSを引いて、http でアクセスします。このとき、 acme.sh が作った特別なファイルがそのサイトに置いてあれば、合格ということです。従って、誰でもどこからでもそのドメイン名でアクセスできる状態でないと Let's Encrypt は利用できません。
退会済みユーザー

退会済みユーザー

2017/10/04 09:01

自分のPC上で行うのではなくレンサバのサーバにアップロードして実行するのですね。 ただ格安レンサバでコマンドなんて打てるんですかね?
退会済みユーザー

退会済みユーザー

2017/10/04 09:20

root@DESKTOP:/mnt/c/Windows/System32/acme.sh-master# ./acme.sh --issue -d https://mysiteurl -w /httpdocs [2017年 10月 4日 水曜日 18:09:33 DST] It seems that https://mysiteurl is an IDN( Internationalized Domain Names), please install 'idn' command first. root@DESKTOP:/mnt/c/Windows/System32/acme.sh-master# ./acme.sh --issue -d mysiteurl -w /httpdocs [2017年 10月 4日 水曜日 18:10:03 DST] Creating domain key [2017年 10月 4日 水曜日 18:10:03 DST] The domain key is here: /root/.acme.sh/mysiteurl/mysiteurl.key [2017年 10月 4日 水曜日 18:10:03 DST] Single domain='mysiteurl' [2017年 10月 4日 水曜日 18:10:04 DST] Getting domain auth token for each domain [2017年 10月 4日 水曜日 18:10:04 DST] Getting webroot for domain='mysiteurl' [2017年 10月 4日 水曜日 18:10:04 DST] Getting new-authz for domain='mysiteurl' [2017年 10月 4日 水曜日 18:10:08 DST] The new-authz request is ok. [2017年 10月 4日 水曜日 18:10:09 DST] Verifying:mysiteurl [2017年 10月 4日 水曜日 18:10:17 DST] mysiteurl:Verify error:Invalid response from http://mysiteurl/.well-known/acme-challenge/EFfp5bVWugYt6nu5X56_2Cj0G35iVU1x-c66pPtv3rg: [2017年 10月 4日 水曜日 18:10:17 DST] Please add '--debug' or '--log' to check more details. [2017年 10月 4日 水曜日 18:10:17 DST] See: https://github.com/Neilpang/acme.sh/wiki/How-to-debug-acme.sh root@DESKTOP:/mnt/c/Windows/System32/acme.sh-master# ./acme.sh --issue -d mysiteurl -w /httpdocs/.well-known/acme-challenge [2017年 10月 4日 水曜日 18:11:43 DST] Single domain='mysiteurl' [2017年 10月 4日 水曜日 18:11:43 DST] Getting domain auth token for each domain [2017年 10月 4日 水曜日 18:11:43 DST] Getting webroot for domain='mysiteurl' [2017年 10月 4日 水曜日 18:11:44 DST] Getting new-authz for domain='mysiteurl' [2017年 10月 4日 水曜日 18:11:49 DST] The new-authz request is ok. [2017年 10月 4日 水曜日 18:11:50 DST] Verifying:mysiteurl [2017年 10月 4日 水曜日 18:11:56 DST] mysiteurl:Verify error:Invalid response from http://mysiteurl/.well-known/acme-challenge/tEHKFEXh_GaFho6CrBCv_PQcIj5qhaUD6xa0zSU9HZs: [2017年 10月 4日 水曜日 18:11:56 DST] Please add '--debug' or '--log' to check more details. [2017年 10月 4日 水曜日 18:11:57 DST] See: https://github.com/Neilpang/acme.sh/wiki/How-to-debug-acme.sh root@DESKTOP:/mnt/c/Windows/System32/acme.sh-master# このように改良していましたがうまくいきません。 もしかして Hv0OUQ4q1id_EOBMlXCgqtuP- というあんこう用ファイルのパスを記載しないといけないのでしょうか? /httpdocs/.well-known/acme-challenge というパスになっています。 実行する場所は自分のpcでいいのでね。
mit0223

2017/10/04 09:49

> というあんこう用ファイルのパスを記載しないといけないのでしょうか? いえ、そうではありません。 http://mysiteurl/.well-known/acme-challenge/EFfp5bVWugYt6nu5X56_2Cj0G35iVU1x-c66pPtv3rg を GET しようとしたらエラーになったということです。このURLにブラウザからアクセスできますか? /htdocs/.well-known/acme-challenge/EFfp5bVWugYt6nu5X56_2Cj0G35iVU1x-c66pPtv3rg というファイルは生成されてますか?
退会済みユーザー

退会済みユーザー

2017/10/04 09:54

Hv0OUQ4q1id_EOBMlXCgqtuP-uzWb8fq9e1zzjk9P6o.fRZIH2q とファイル名がブラウザ上に表記されました。 また、ffftpでは存在することになっています、 白い資格のアイコンは有ります
mit0223

2017/10/04 20:31

内容的には問題なさそうで原因がわかりません。 ./acme.sh --issue -d mysiteurl -w /httpdocs --debug で実行してみてください。
退会済みユーザー

退会済みユーザー

2017/10/05 01:18

ありがとうございます。 System32/acme.sh-master# acme.sh --issue -d mysiteurl -w /httpdocs --debug acme.sh: コマンドが見つかりません このようになりました。
mit0223

2017/10/05 10:53

先頭に./を指定してください。
退会済みユーザー

退会済みユーザー

2017/10/05 11:43 編集

カレントでも省略できないのですね。 下記のようになったのですが、アクセスしたところ相変わらず保護されていないと出てしまいます。 centos5@DESKTOP:/mnt/c/Windows/System32/acme.sh-master$ ./acme.sh --issue -d mysiteurl -w /httpdocs --debug [2017年 10月 5日 木曜日 20:31:43 DST] Lets find script dir. [2017年 10月 5日 木曜日 20:31:43 DST] _SCRIPT_='./acme.sh' [2017年 10月 5日 木曜日 20:31:43 DST] _script='/mnt/c/Windows/System32/acme.sh-master/acme.sh' [2017年 10月 5日 木曜日 20:31:43 DST] _script_home='/mnt/c/Windows/System32/acme.sh-master' [2017年 10月 5日 木曜日 20:31:43 DST] Using default home:/home/centos5/.acme.sh [2017年 10月 5日 木曜日 20:31:43 DST] Using config home:/home/centos5/.acme.sh https://github.com/Neilpang/acme.sh v2.7.4 [2017年 10月 5日 木曜日 20:31:43 DST] Using config home:/home/centos5/.acme.sh [2017年 10月 5日 木曜日 20:31:44 DST] DOMAIN_PATH='/home/centos5/.acme.sh/mysiteurl' [2017年 10月 5日 木曜日 20:31:44 DST] Using ACME_DIRECTORY: https://acme-v01.api.letsencrypt.org/directory [2017年 10月 5日 木曜日 20:31:44 DST] _init api for server: https://acme-v01.api.letsencrypt.org/directory [2017年 10月 5日 木曜日 20:31:44 DST] ACME_KEY_CHANGE='https://acme-v01.api.letsencrypt.org/acme/key-change' [2017年 10月 5日 木曜日 20:31:44 DST] ACME_NEW_AUTHZ='https://acme-v01.api.letsencrypt.org/acme/new-authz' [2017年 10月 5日 木曜日 20:31:44 DST] ACME_NEW_ORDER='https://acme-v01.api.letsencrypt.org/acme/new-cert' [2017年 10月 5日 木曜日 20:31:44 DST] ACME_NEW_ACCOUNT='https://acme-v01.api.letsencrypt.org/acme/new-reg' [2017年 10月 5日 木曜日 20:31:44 DST] ACME_REVOKE_CERT='https://acme-v01.api.letsencrypt.org/acme/revoke-cert' [2017年 10月 5日 木曜日 20:31:45 DST] _on_before_issue [2017年 10月 5日 木曜日 20:31:45 DST] Le_LocalAddress [2017年 10月 5日 木曜日 20:31:45 DST] Check for domain='mysiteurl' [2017年 10月 5日 木曜日 20:31:45 DST] _currentRoot='/httpdocs' [2017年 10月 5日 木曜日 20:31:45 DST] config file is empty, can not read CA_KEY_HASH [2017年 10月 5日 木曜日 20:31:45 DST] Using config home:/home/centos5/.acme.sh [2017年 10月 5日 木曜日 20:31:45 DST] Use default length 2048 [2017年 10月 5日 木曜日 20:31:45 DST] length='2048' [2017年 10月 5日 木曜日 20:31:45 DST] Using config home:/home/centos5/.acme.sh [2017年 10月 5日 木曜日 20:31:45 DST] Use length 2048 [2017年 10月 5日 木曜日 20:31:45 DST] Using RSA: 2048 [2017年 10月 5日 木曜日 20:31:46 DST] RSA key [2017年 10月 5日 木曜日 20:31:46 DST] _init api for server: https://acme-v01.api.letsencrypt.org/directory [2017年 10月 5日 木曜日 20:31:46 DST] ACME_KEY_CHANGE='https://acme-v01.api.letsencrypt.org/acme/key-change' [2017年 10月 5日 木曜日 20:31:47 DST] ACME_NEW_AUTHZ='https://acme-v01.api.letsencrypt.org/acme/new-authz' [2017年 10月 5日 木曜日 20:31:47 DST] ACME_NEW_ORDER='https://acme-v01.api.letsencrypt.org/acme/new-cert' [2017年 10月 5日 木曜日 20:31:47 DST] ACME_NEW_ACCOUNT='https://acme-v01.api.letsencrypt.org/acme/new-reg' [2017年 10月 5日 木曜日 20:31:47 DST] ACME_REVOKE_CERT='https://acme-v01.api.letsencrypt.org/acme/revoke-cert' [2017年 10月 5日 木曜日 20:31:47 DST] AGREEMENT [2017年 10月 5日 木曜日 20:31:47 DST] Registering account [2017年 10月 5日 木曜日 20:31:47 DST] url='https://acme-v01.api.letsencrypt.org/acme/new-reg' [2017年 10月 5日 木曜日 20:31:47 DST] payload='{"resource": "new-reg", "agreement": ""}' [2017年 10月 5日 木曜日 20:31:47 DST] GET [2017年 10月 5日 木曜日 20:31:47 DST] url='https://acme-v01.api.letsencrypt.org/directory' [2017年 10月 5日 木曜日 20:31:47 DST] timeout [2017年 10月 5日 木曜日 20:31:47 DST] _CURL='curl -L --silent --dump-header /home/centos5/.acme.sh/http.header ' [2017年 10月 5日 木曜日 20:31:55 DST] ret='0' [2017年 10月 5日 木曜日 20:31:55 DST] POST [2017年 10月 5日 木曜日 20:31:55 DST] url='https://acme-v01.api.letsencrypt.org/acme/new-reg' [2017年 10月 5日 木曜日 20:31:55 DST] _CURL='curl -L --silent --dump-header /home/centos5/.acme.sh/http.header ' [2017年 10月 5日 木曜日 20:31:57 DST] _ret='0' [2017年 10月 5日 木曜日 20:31:57 DST] code='201' [2017年 10月 5日 木曜日 20:31:57 DST] Registered [2017年 10月 5日 木曜日 20:31:57 DST] _accUri='https://acme-v01.api.letsencrypt.org/acme/reg/22261800' [2017年 10月 5日 木曜日 20:31:57 DST] _tos='https://letsencrypt.org/documents/LE-SA-v1.1.1-August-1-2016.pdf' [2017年 10月 5日 木曜日 20:31:57 DST] AGREEMENT='https://letsencrypt.org/documents/LE-SA-v1.1.1-August-1-2016.pdf' [2017年 10月 5日 木曜日 20:31:57 DST] Update tos: https://letsencrypt.org/documents/LE-SA-v1.1.1-August-1-2016.pdf [2017年 10月 5日 木曜日 20:31:57 DST] url='https://acme-v01.api.letsencrypt.org/acme/reg/22261800' [2017年 10月 5日 木曜日 20:31:57 DST] payload='{"resource": "reg", "agreement": "https://letsencrypt.org/documents/LE-SA-v1.1.1-August-1-2016.pdf"}' [2017年 10月 5日 木曜日 20:31:58 DST] POST [2017年 10月 5日 木曜日 20:31:58 DST] url='https://acme-v01.api.letsencrypt.org/acme/reg/22261800' [2017年 10月 5日 木曜日 20:31:58 DST] _CURL='curl -L --silent --dump-header /home/centos5/.acme.sh/http.header ' [2017年 10月 5日 木曜日 20:32:01 DST] _ret='0' [2017年 10月 5日 木曜日 20:32:01 DST] code='202' [2017年 10月 5日 木曜日 20:32:01 DST] Update account tos info success. [2017年 10月 5日 木曜日 20:32:01 DST] Calc CA_KEY_HASH='7SEkY/FboQM9w8rwQpEZ57ygOb196tdNLjTI0JtyL5Q=' [2017年 10月 5日 木曜日 20:32:01 DST] ACCOUNT_THUMBPRINT='YYJDauP9fxZ7aYxEQlSfVna-U60PIm2oQNznLof7Ozc' [2017年 10月 5日 木曜日 20:32:01 DST] Read key length: [2017年 10月 5日 木曜日 20:32:01 DST] Creating domain key [2017年 10月 5日 木曜日 20:32:01 DST] Use DEFAULT_DOMAIN_KEY_LENGTH=2048 [2017年 10月 5日 木曜日 20:32:01 DST] Using config home:/home/centos5/.acme.sh [2017年 10月 5日 木曜日 20:32:01 DST] Use length 2048 [2017年 10月 5日 木曜日 20:32:02 DST] Using RSA: 2048 [2017年 10月 5日 木曜日 20:32:02 DST] The domain key is here: /home/centos5/.acme.sh/mysiteurl/mysiteurl.key [2017年 10月 5日 木曜日 20:32:02 DST] _createcsr [2017年 10月 5日 木曜日 20:32:03 DST] Single domain='mysiteurl' [2017年 10月 5日 木曜日 20:32:03 DST] Getting domain auth token for each domain [2017年 10月 5日 木曜日 20:32:03 DST] Getting webroot for domain='mysiteurl' [2017年 10月 5日 木曜日 20:32:03 DST] _w='/httpdocs' [2017年 10月 5日 木曜日 20:32:03 DST] _currentRoot='/httpdocs' [2017年 10月 5日 木曜日 20:32:03 DST] Getting new-authz for domain='mysiteurl' [2017年 10月 5日 木曜日 20:32:03 DST] _init api for server: https://acme-v01.api.letsencrypt.org/directory [2017年 10月 5日 木曜日 20:32:03 DST] ACME_KEY_CHANGE='https://acme-v01.api.letsencrypt.org/acme/key-change' [2017年 10月 5日 木曜日 20:32:03 DST] ACME_NEW_AUTHZ='https://acme-v01.api.letsencrypt.org/acme/new-authz' [2017年 10月 5日 木曜日 20:32:03 DST] ACME_NEW_ORDER='https://acme-v01.api.letsencrypt.org/acme/new-cert' [2017年 10月 5日 木曜日 20:32:03 DST] ACME_NEW_ACCOUNT='https://acme-v01.api.letsencrypt.org/acme/new-reg' [2017年 10月 5日 木曜日 20:32:03 DST] ACME_REVOKE_CERT='https://acme-v01.api.letsencrypt.org/acme/revoke-cert' [2017年 10月 5日 木曜日 20:32:03 DST] Try new-authz for the 0 time. [2017年 10月 5日 木曜日 20:32:03 DST] url='https://acme-v01.api.letsencrypt.org/acme/new-authz' [2017年 10月 5日 木曜日 20:32:03 DST] payload='{"resource": "new-authz", "identifier": {"type": "dns", "value": "mysiteurl"}}' [2017年 10月 5日 木曜日 20:32:04 DST] POST [2017年 10月 5日 木曜日 20:32:04 DST] url='https://acme-v01.api.letsencrypt.org/acme/new-authz' [2017年 10月 5日 木曜日 20:32:04 DST] _CURL='curl -L --silent --dump-header /home/centos5/.acme.sh/http.header ' [2017年 10月 5日 木曜日 20:32:05 DST] _ret='0' [2017年 10月 5日 木曜日 20:32:06 DST] code='400' [2017年 10月 5日 木曜日 20:32:06 DST] The new-authz request is ok. [2017年 10月 5日 木曜日 20:32:06 DST] new-authz error: {"type":"urn:acme:error:malformed","detail":"Error creating new authz :: DNS name does not have enough labels","status": 400} [2017年 10月 5日 木曜日 20:32:06 DST] pid [2017年 10月 5日 木曜日 20:32:06 DST] No need to restore nginx, skip. [2017年 10月 5日 木曜日 20:32:06 DST] _clearupdns [2017年 10月 5日 木曜日 20:32:06 DST] skip dns. [2017年 10月 5日 木曜日 20:32:06 DST] _on_issue_err [2017年 10月 5日 木曜日 20:32:06 DST] Please add '--debug' or '--log' to check more details. [2017年 10月 5日 木曜日 20:32:06 DST] See: https://github.com/Neilpang/acme.sh/wiki/How-to-debug-acme.sh [2017年 10月 5日 木曜日 20:32:06 DST] socat doesn't exists. [2017年 10月 5日 木曜日 20:32:06 DST] Diagnosis versions: openssl:openssl OpenSSL 1.0.1f 6 Jan 2014 apache: apache doesn't exists. nginx: nginx doesn't exists. socat: centos5@DESKTOP:/mnt/c/Windows/System32/acme.sh-master$ うまくいっている様に見えるのですが
mit0223

2017/10/05 22:38

ググってみましたが、DNS にドメインが正しく登録されていないときに出るエラーのようです。 -d に指定したドメインのIPアドレスが公式DNS上でサーバのアドレスになっているでしょうか? もし、 -d に複数のドメインをカンマ区切りで指定しているのであれば、1個だけにして実行してみてもらえますか。
mit0223

2017/10/05 22:49

確認ですが、貼っていただいいてるログの mysiteurl というドメイン名は実際にそのように実行しているわけではないのですよね?もし、-d mysiteurl で実行しているのであれば、DNSに登録されているドメイン名に置き換えて実行してください。 Lets encrypt は公式なDNSに登録されいてるドメイン名、IPアドレスに対するものしか証明書は取れません。
退会済みユーザー

退会済みユーザー

2017/10/06 02:29

大変恐縮です。おっしゃる通りのミスを訂正しました。 ただどうもパーミッションの問題なのかアクセスできないようなコメントが出てきました。 レンサバ側のパーミッションで消化? 何度も大変恐縮です。 /mnt/c/Windows/System32/acme.sh-master$ ./acme.sh --issue -d mysite -w /httpdocs --debug [2017年 10月 6日 金曜日 11:13:31 DST] Lets find script dir. [2017年 10月 6日 金曜日 11:13:31 DST] _SCRIPT_='./acme.sh' [2017年 10月 6日 金曜日 11:13:32 DST] _script='/mnt/c/Windows/System32/acme.sh-master/acme.sh' [2017年 10月 6日 金曜日 11:13:32 DST] _script_home='/mnt/c/Windows/System32/acme.sh-master' [2017年 10月 6日 金曜日 11:13:32 DST] Using default home:/home/centos5/.acme.sh [2017年 10月 6日 金曜日 11:13:32 DST] Using config home:/home/centos5/.acme.sh https://github.com/Neilpang/acme.sh v2.7.4 [2017年 10月 6日 金曜日 11:13:32 DST] Using config home:/home/centos5/.acme.sh [2017年 10月 6日 金曜日 11:13:32 DST] DOMAIN_PATH='/home/centos5/.acme.sh/mysite' [2017年 10月 6日 金曜日 11:13:32 DST] Using ACME_DIRECTORY: https://acme-v01.api.letsencrypt.org/directory [2017年 10月 6日 金曜日 11:13:32 DST] _init api for server: https://acme-v01.api.letsencrypt.org/directory [2017年 10月 6日 金曜日 11:13:32 DST] ACME_KEY_CHANGE='https://acme-v01.api.letsencrypt.org/acme/key-change' [2017年 10月 6日 金曜日 11:13:32 DST] ACME_NEW_AUTHZ='https://acme-v01.api.letsencrypt.org/acme/new-authz' [2017年 10月 6日 金曜日 11:13:32 DST] ACME_NEW_ORDER='https://acme-v01.api.letsencrypt.org/acme/new-cert' [2017年 10月 6日 金曜日 11:13:32 DST] ACME_NEW_ACCOUNT='https://acme-v01.api.letsencrypt.org/acme/new-reg' [2017年 10月 6日 金曜日 11:13:32 DST] ACME_REVOKE_CERT='https://acme-v01.api.letsencrypt.org/acme/revoke-cert' [2017年 10月 6日 金曜日 11:13:33 DST] _on_before_issue [2017年 10月 6日 金曜日 11:13:33 DST] Le_LocalAddress [2017年 10月 6日 金曜日 11:13:33 DST] Check for domain='mysite' [2017年 10月 6日 金曜日 11:13:34 DST] _currentRoot='/httpdocs' [2017年 10月 6日 金曜日 11:13:34 DST] _saved_account_key_hash is not changed, skip register account. [2017年 10月 6日 金曜日 11:13:34 DST] Read key length: [2017年 10月 6日 金曜日 11:13:34 DST] Creating domain key [2017年 10月 6日 金曜日 11:13:34 DST] Use DEFAULT_DOMAIN_KEY_LENGTH=2048 [2017年 10月 6日 金曜日 11:13:34 DST] Using config home:/home/centos5/.acme.sh [2017年 10月 6日 金曜日 11:13:34 DST] Use length 2048 [2017年 10月 6日 金曜日 11:13:34 DST] Using RSA: 2048 [2017年 10月 6日 金曜日 11:13:36 DST] The domain key is here: /home/centos5/.acme.sh/mysite/mysite.key [2017年 10月 6日 金曜日 11:13:36 DST] _createcsr [2017年 10月 6日 金曜日 11:13:36 DST] Single domain='mysite' [2017年 10月 6日 金曜日 11:13:36 DST] Getting domain auth token for each domain [2017年 10月 6日 金曜日 11:13:36 DST] Getting webroot for domain='mysite' [2017年 10月 6日 金曜日 11:13:36 DST] _w='/httpdocs' [2017年 10月 6日 金曜日 11:13:36 DST] _currentRoot='/httpdocs' [2017年 10月 6日 金曜日 11:13:37 DST] Getting new-authz for domain='mysite' [2017年 10月 6日 金曜日 11:13:37 DST] _init api for server: https://acme-v01.api.letsencrypt.org/directory [2017年 10月 6日 金曜日 11:13:37 DST] ACME_KEY_CHANGE='https://acme-v01.api.letsencrypt.org/acme/key-change' [2017年 10月 6日 金曜日 11:13:37 DST] ACME_NEW_AUTHZ='https://acme-v01.api.letsencrypt.org/acme/new-authz' [2017年 10月 6日 金曜日 11:13:37 DST] ACME_NEW_ORDER='https://acme-v01.api.letsencrypt.org/acme/new-cert' [2017年 10月 6日 金曜日 11:13:37 DST] ACME_NEW_ACCOUNT='https://acme-v01.api.letsencrypt.org/acme/new-reg' [2017年 10月 6日 金曜日 11:13:37 DST] ACME_REVOKE_CERT='https://acme-v01.api.letsencrypt.org/acme/revoke-cert' [2017年 10月 6日 金曜日 11:13:37 DST] Try new-authz for the 0 time. [2017年 10月 6日 金曜日 11:13:37 DST] url='https://acme-v01.api.letsencrypt.org/acme/new-authz' [2017年 10月 6日 金曜日 11:13:37 DST] payload='{"resource": "new-authz", "identifier": {"type": "dns", "value": "mysite"}}' [2017年 10月 6日 金曜日 11:13:37 DST] RSA key [2017年 10月 6日 金曜日 11:13:38 DST] GET [2017年 10月 6日 金曜日 11:13:38 DST] url='https://acme-v01.api.letsencrypt.org/directory' [2017年 10月 6日 金曜日 11:13:38 DST] timeout [2017年 10月 6日 金曜日 11:13:38 DST] _CURL='curl -L --silent --dump-header /home/centos5/.acme.sh/http.header ' [2017年 10月 6日 金曜日 11:13:41 DST] ret='0' [2017年 10月 6日 金曜日 11:13:42 DST] POST [2017年 10月 6日 金曜日 11:13:42 DST] url='https://acme-v01.api.letsencrypt.org/acme/new-authz' [2017年 10月 6日 金曜日 11:13:42 DST] _CURL='curl -L --silent --dump-header /home/centos5/.acme.sh/http.header ' [2017年 10月 6日 金曜日 11:13:43 DST] _ret='0' [2017年 10月 6日 金曜日 11:13:44 DST] code='201' [2017年 10月 6日 金曜日 11:13:44 DST] The new-authz request is ok. [2017年 10月 6日 金曜日 11:13:44 DST] entry='"type":"http-01","status":"pending","uri":"https://acme-v01.api.letsencrypt.org/acme/challenge/ruzZNXt0M6Bv02uW66Jh3gqpjdc/2139915464","token":"QSG3tYK9aqymZULcQou8dH6Celv0wpIFEieKRqwTz7Q"' [2017年 10月 6日 金曜日 11:13:44 DST] token='QSG3tYK9aqymZULcQou8dH6Celv0wpIFEieKRqwTz7Q' [2017年 10月 6日 金曜日 11:13:44 DST] uri='https://acme-v01.api.letsencrypt.org/acme/challenge/ruzZNXt0M6Bv02uW66Jh3gqpjdc/2139915464' [2017年 10月 6日 金曜日 11:13:44 DST] keyauthorization='QSG3tYK9aqymZULcQou8dH6Celv0wpIFEieKRqwTz7Q.YYJDauP9fxZ7aYxEQlSfVna-U60PIm2oQNznLof7Ozc' [2017年 10月 6日 金曜日 11:13:45 DST] dvlist='mysite#QSG3tYK9aqymZULcQou8dH6Celv0wpIFEieKRqwTz7Q.YYJDauP9fxZ7aYxEQlSfVna-U60PIm2oQNznLof7Ozc#https://acme-v01.api.letsencrypt.org/acme/challenge/ruzZNXt0M6Bv02uW66Jh3gqpjdc/2139915464#http-01#/httpdocs' [2017年 10月 6日 金曜日 11:13:45 DST] vlist='mysite#QSG3tYK9aqymZULcQou8dH6Celv0wpIFEieKRqwTz7Q.YYJDauP9fxZ7aYxEQlSfVna-U60PIm2oQNznLof7Ozc#https://acme-v01.api.letsencrypt.org/acme/challenge/ruzZNXt0M6Bv02uW66Jh3gqpjdc/2139915464#http-01#/httpdocs,' [2017年 10月 6日 金曜日 11:13:45 DST] ok, let's start to verify [2017年 10月 6日 金曜日 11:13:45 DST] Verifying:mysite [2017年 10月 6日 金曜日 11:13:45 DST] d='mysite' [2017年 10月 6日 金曜日 11:13:45 DST] keyauthorization='QSG3tYK9aqymZULcQou8dH6Celv0wpIFEieKRqwTz7Q.YYJDauP9fxZ7aYxEQlSfVna-U60PIm2oQNznLof7Ozc' [2017年 10月 6日 金曜日 11:13:45 DST] uri='https://acme-v01.api.letsencrypt.org/acme/challenge/ruzZNXt0M6Bv02uW66Jh3gqpjdc/2139915464' [2017年 10月 6日 金曜日 11:13:46 DST] _currentRoot='/httpdocs' [2017年 10月 6日 金曜日 11:13:46 DST] wellknown_path='/httpdocs/.well-known/acme-challenge' [2017年 10月 6日 金曜日 11:13:46 DST] writing token:QSG3tYK9aqymZULcQou8dH6Celv0wpIFEieKRqwTz7Q to /httpdocs/.well-known/acme-challenge/QSG3tYK9aqymZULcQou8dH6Celv0wpIFEieKRqwTz7Q ./acme.sh: 3653: ./acme.sh: cannot create /httpdocs/.well-known/acme-challenge/QSG3tYK9aqymZULcQou8dH6Celv0wpIFEieKRqwTz7Q: Permission denied [2017年 10月 6日 金曜日 11:13:46 DST] mysite:Can not write token to file : /httpdocs/.well-known/acme-challenge/QSG3tYK9aqymZULcQou8dH6Celv0wpIFEieKRqwTz7Q [2017年 10月 6日 金曜日 11:13:46 DST] Debugging, skip removing: /httpdocs/.well-known/acme-challenge/QSG3tYK9aqymZULcQou8dH6Celv0wpIFEieKRqwTz7Q [2017年 10月 6日 金曜日 11:13:46 DST] pid [2017年 10月 6日 金曜日 11:13:46 DST] No need to restore nginx, skip. [2017年 10月 6日 金曜日 11:13:46 DST] _clearupdns [2017年 10月 6日 金曜日 11:13:46 DST] skip dns. [2017年 10月 6日 金曜日 11:13:46 DST] _on_issue_err [2017年 10月 6日 金曜日 11:13:46 DST] Please add '--debug' or '--log' to check more details. [2017年 10月 6日 金曜日 11:13:46 DST] See: https://github.com/Neilpang/acme.sh/wiki/How-to-debug-acme.sh [2017年 10月 6日 金曜日 11:13:47 DST] url='https://acme-v01.api.letsencrypt.org/acme/challenge/ruzZNXt0M6Bv02uW66Jh3gqpjdc/2139915464' [2017年 10月 6日 金曜日 11:13:47 DST] payload='{"resource": "challenge", "keyAuthorization": "QSG3tYK9aqymZULcQou8dH6Celv0wpIFEieKRqwTz7Q.YYJDauP9fxZ7aYxEQlSfVna-U60PIm2oQNznLof7Ozc"}' [2017年 10月 6日 金曜日 11:13:47 DST] POST [2017年 10月 6日 金曜日 11:13:47 DST] url='https://acme-v01.api.letsencrypt.org/acme/challenge/ruzZNXt0M6Bv02uW66Jh3gqpjdc/2139915464' [2017年 10月 6日 金曜日 11:13:47 DST] _CURL='curl -L --silent --dump-header /home/centos5/.acme.sh/http.header ' [2017年 10月 6日 金曜日 11:13:49 DST] _ret='0' [2017年 10月 6日 金曜日 11:13:49 DST] code='202' [2017年 10月 6日 金曜日 11:13:49 DST] socat doesn't exists. [2017年 10月 6日 金曜日 11:13:49 DST] Diagnosis versions: openssl:openssl OpenSSL 1.0.1f 6 Jan 2014 apache: apache doesn't exists. nginx: nginx doesn't exists. socat:
mit0223

2017/10/06 03:49

そうですね。 ./acme.sh を実行するユーザで/httpdocsにディレクトリを作成する権限が必要です。
退会済みユーザー

退会済みユーザー

2017/10/06 03:54

Windows/System32/acme.sh-master$ su としないといけないという事でよいのでしょうか? これは自分のPCでroot権限になるだけだと思うのですが、レンサバ上でなる必要があるというわけではないのですね。
退会済みユーザー

退会済みユーザー

2017/10/06 05:08

大元の質問に追記しました。
mit0223

2017/10/07 00:45

環境が良くわかってないのですが、サーバのディレクトリを自分のpcにマウントして実行しているということでしょうか? うーん、ipが違うのが気になりますが、とりあえず、アクセス権を確保してください。 どうやってレンタルサーバのディレクトリをマウントしているか、bash on windowsをどうやって実行しているかによります。 とにかく mkdir /httpdocs/test;rmdir /httpdocs/test などを実行してエラーにならないように設定する必要があります。
mit0223

2017/10/07 00:47

よろしければ、レンタルサーバとpcの設定の詳細を追記してもらえますか。
退会済みユーザー

退会済みユーザー

2017/10/07 07:21 編集

ここで例のコマンドを実行しないといけないという事でしょうか? ただレンサバにコードを打てるターミナルがあるというのは聞いたことがありません。 vpsではないので。 現在は、自分が持っているPCで打っています。 レンサバ上で打たないといけないのでしょうか?
scsi

2017/10/07 03:10

Lets encryptの公式の説明ページを隅から隅まで1度見た方がいいと思いますよ。仕組みを理解してないからこのような不毛なやり取りになってるかと思います。
mit0223

2017/10/07 07:18

レンタルサーバのドメインの証明書を自分のpc上のcertbotやacme.shでとることはできません。certbotやacme.shは、何度かコメントしてるように公式なDNSに登録されているipアドレスを持つWebサーバ上で動かす必要があります。
退会済みユーザー

退会済みユーザー

2017/10/07 07:24

レンサバでcerbotをインストールしてシェルコマンドを打つなんてできるんですか? 初めてとった時はクライアントでやったのですが、
退会済みユーザー

退会済みユーザー

2017/10/07 07:42

シェルアクセスは利用できますか? 共用サーバープランではTelnetおよびSSHでのアクセスは許可しておりません。ご了承ください。 とあります。 まさか始めの取得はできるのに、その後の更新だけできないなんてことですか? それなら始めからやらなければよかった。 ssl化しろとグーグルが言うので大変な思いをしてやったのに、無駄な時間だったんですかね。 ssl化しろといっている連中も無責任です。 たいしたメリットもないようですしね。 roripoやさくらならできるんですかね。やっぱり安すぎる所はだめですね
scsi

2017/10/07 09:03

さくらのレンサバならacme.shは使えますね。cronも使えるので気合を入れてさくらのレンサバのコンパネに適用するスクリプトを書けば自動更新も出来ます。私はしました。
退会済みユーザー

退会済みユーザー

2017/10/07 09:45

シェルアクセスは利用できますか? 共用サーバープランではTelnetおよびSSHでのアクセスは許可しておりません。ご了承ください。 とある所は絶対に無理なのですね
mit0223

2017/10/07 14:13

> 始めは取得できるのに この質問で納得いかないのはこの点です。原理的に1回目も取れるはずないのですが、どうやってとったのでしょうか?
scsi

2017/10/07 14:46

正引きを一度自分のPCのIPに設定して実行したのではないかと思ってました。
退会済みユーザー

退会済みユーザー

2017/10/07 14:52

自分のpcでコマンドを打ってできました。 初めもできないはずなのですか? 期限が切れるまで、httpsで有効期限切れと出ていませんでした。 はじめから上手く行っていなかったらそのようになりませんよね
mit0223

2017/10/07 14:53

scsi様、なるほどですが、それができる人であれば今回もこのような質問にならないと思います。質問者様とは別の方がされたのでしょうか。
mit0223

2017/10/07 15:07

> 自分のpcでコマンドを打ってできました。 これはご自分で実行されましたか? その時、pc上のwebサーバは外部から参照できるようにネットワークを設定されましたか?
scsi

2017/10/07 15:13 編集

これで、更新された証明書がWindowsPCにできるかもですね。 ./certbot-auto certonly --manual -d ドメイン名 って 質問者さんのコマンドに manual って書いてありましたね。
mit0223

2017/10/07 15:28

すみません。scsi さん、回答をお願いします。
mit0223

2017/10/07 15:33

scsiさん、ありがとうございました。 amebatvさん、scsiさんの回答をもとにやってみてください。
退会済みユーザー

退会済みユーザー

2017/10/08 01:49

ありがとうございます。 System32/acme.sh-master$ ./certbot-auto certonly --manual -d mysite bash: ./certbot-auto: そのようなファイルやディレクトリはありません centos5@DESKTOP:/mnt/c/Windows/System32/acme.sh-master$ cd ../ centos5@DESKTOP:/mnt/c/Windows/System32$ ./certbot-auto certonly --manual -d mysite Upgrading certbot-auto 0.15.0 to 0.19.0... Replacing certbot-auto... sudo: ホスト DESKTOP の名前解決ができません [sudo] password for centos5: sudo: ホスト DESKTOP の名前解決ができません sudo: ホスト DESKTOP の名前解決ができません mv: デバイス間移動失敗: `/tmp/tmp.ukJrYqUbLg/letsencrypt-auto.permission-clone' から `./certbot-auto' 。移動先を削除できません: 許可がありません このようになりました。 途中でrootに昇格しても初めからsudoにしてもダメでです。
mit0223

2017/10/10 00:26

ループしていますが、 自分自身が古いのでバージョンアップしようとしているようですね。 Windows からマウントしたディレクトリで実行しているので、書き換えに失敗しているようです。 マウント先から起動するのではなく、/usr/bin とかにコピーされてはどうでしょうか? # cp /mnt/c/Windows/System32/certbot-auto /usr/bin # certbot-auto certonly --manual -d ikenie3.org,www.ikenie3.org,blog.ikenie3.org
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問