6
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Let's Encrypt を使った SSL 設定 for Amazon Linux

Last updated at Posted at 2017-04-13

SSLのサイトを作ってみたくなった

ちょっとした無償サービスを作るにあたって、Let's Encrypt を使った SSL を試しに使ってみたくてやってみました。
環境は、Amazon Linux。

手順

$ wget https://dl.eff.org/certbot-auto
$ chmod a+x certbot-auto
$ ./certbot-auto
(中略)
FATAL: Amazon Linux support is very experimental at present...
if you would like to work on improving it, please ensure you have backups
and then run this script again with the --debug flag!
Alternatively, you can install OS dependencies yourself and run this script
again with --no-bootstrap.

Amazon Linux は、--debug をつけろというのでつけました。

$ ./certbot-auto --debug
(中略)
The following errors were reported by the server:

Domain: XXX.XXX.jp
Type:   connection
Detail: Failed to connect to XXX.XXX.XXX.XXX:443 for tls-sni-01 challenge
(後略)

よくよく調べると以下に該当。

セキュリティグループに、443を指定するのを忘れていたので指定して、コンソールからインスタンス再起動。

$ ./certbot-auto renew

インストールが終わったら、httpd を再起動。

$ sudo service httpd graceful

https でアクセスして完了を確認。

参考

https://letsencrypt.jp/
http://qiita.com/takahiko/items/a08895550727b95b6c36
http://docs.aws.amazon.com/ja_jp/AWSEC2/latest/UserGuide/SSL-on-an-instance.html#ssl_enable

6
8
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?