私はこのガイドに従っています: https://www.digitalocean.com/community/tutorials/how-to-set-up-let-s-encrypt-certificates-for-multiple-apache-virtual-hosts-on-ubuntu- 14-04 .
チュートリアルに示されているように git リポジトリをプルしました。コマンドを実行すると./letsencrypt-auto --apache -d example.com -d www.example.com
、example.com が実際のサイトであり、連絡先のメール アドレスを尋ねられましたが、残りのアクションをポップする代わりに、ポップしましたこのエラー メッセージ:
An unexpected error occurred:
NameError: free variable 'addrs' referenced before assignment in enclosing scope
しかし、それは証明書を作成しました。ウェブサイト ssllabs を試してみましたが、サーバーはポート 443 でリッスンしていましたが、安全な転送を提供しておらず、https: //example.com も実際には機能していませんでした (読み込まれませんでした)。
gitリポジトリを再プルしても、何度も実行しようとしましたが、常に同じエラーメッセージが表示されました。
ログ ファイルの完全な内容 (エラーを表す最後の 38 行、ログに記録されたユーザーを $USER に置き換えたもの):
2016-02-11 16:59:24,530:DEBUG:letsencrypt.error_handler:Encountered exception:
Traceback (most recent call last):
File "/home/$USER/.local/share/letsencrypt/local/lib/python2.7/site-packages/letsencrypt/client.py", line 355, in deploy_certificate
fullchain_path=fullchain_path)
File "/home/$USER/.local/share/letsencrypt/local/lib/python2.7/site-packages/letsencrypt_apache/configurator.py", line 214, in deploy_cert
vhost = self.choose_vhost(domain)
File "/home/$USER/.local/share/letsencrypt/local/lib/python2.7/site-packages/letsencrypt_apache/configurator.py", line 308, in choose_vhost
vhost = self.make_vhost_ssl(vhost)
File "/home/$USER/.local/share/letsencrypt/local/lib/python2.7/site-packages/letsencrypt_apache/configurator.py", line 733, in make_vhost_ssl
self._add_name_vhost_if_necessary(ssl_vhost)
File "/home/$USER/.local/share/letsencrypt/local/lib/python2.7/site-packages/letsencrypt_apache/configurator.py", line 905, in _add_name_vhost_if_necessary
test_addr in test_vh.addrs) and
File "/home/$USER/.local/share/letsencrypt/local/lib/python2.7/site-packages/letsencrypt_apache/configurator.py", line 905, in <genexpr>
test_addr in test_vh.addrs) and
NameError: free variable 'addrs' referenced before assignment in enclosing scope
2016-02-11 16:59:24,530:DEBUG:letsencrypt.error_handler:Calling registered functions
2016-02-11 16:59:24,534:DEBUG:letsencrypt.cli:Exiting abnormally:
Traceback (most recent call last):
File "/home/$USER/.local/share/letsencrypt/bin/letsencrypt", line 11, in <module>
sys.exit(main())
File "/home/$USER/.local/share/letsencrypt/local/lib/python2.7/site-packages/letsencrypt/cli.py", line 1987, in main
return config.func(config, plugins)
File "/home/$USER/.local/share/letsencrypt/local/lib/python2.7/site-packages/letsencrypt/cli.py", line 667, in run
lineage.chain, lineage.fullchain)
File "/home/$USER/.local/share/letsencrypt/local/lib/python2.7/site-packages/letsencrypt/client.py", line 355, in deploy_certificate
fullchain_path=fullchain_path)
File "/home/$USER/.local/share/letsencrypt/local/lib/python2.7/site-packages/letsencrypt_apache/configurator.py", line 214, in deploy_cert
vhost = self.choose_vhost(domain)
File "/home/$USER/.local/share/letsencrypt/local/lib/python2.7/site-packages/letsencrypt_apache/configurator.py", line 308, in choose_vhost
vhost = self.make_vhost_ssl(vhost)
File "/home/$USER/.local/share/letsencrypt/local/lib/python2.7/site-packages/letsencrypt_apache/configurator.py", line 733, in make_vhost_ssl
self._add_name_vhost_if_necessary(ssl_vhost)
File "/home/$USER/.local/share/letsencrypt/local/lib/python2.7/site-packages/letsencrypt_apache/configurator.py", line 905, in _add_name_vhost_if_necessary
test_addr in test_vh.addrs) and
File "/home/$USER/.local/share/letsencrypt/local/lib/python2.7/site-packages/letsencrypt_apache/configurator.py", line 905, in <genexpr>
test_addr in test_vh.addrs) and
NameError: free variable 'addrs' referenced before assignment in enclosing scope
この問題は何ですか?どうすれば修正できますか?
読んでくれてありがとう。