---
title: Let's Encrypt は使えますか？
description: セルフホスティングでご利用いただける、AmazonLinux 2 の最新バージョンの Amimoto では、以下の手順で Let's Encrypt のインストールが可能です。
---

[コンテンツまでスキップ](https://knowledge.amimoto-ami.com/knowledge/self-lets-encrypt#main-content)

- [日本語](https://knowledge.amimoto-ami.com/knowledge/self-lets-encrypt)
- [English](https://knowledge.amimoto-ami.com/en/knowledge/5.-enabling-https-using-lets-encrypt-on-amimoto-ami-2)

日本語

翻訳のサブメニューを表示

![Amimoto-dark-ogp.png\]](https://knowledge.amimoto-ami.com/hs-fs/hubfs/Amimoto-dark-ogp.png?height=40&name=Amimoto-dark-ogp.png)

- ホーム
- 製品
- 価格
- ブログ
- 会社

メインナビゲーションを開く

メインナビゲーションを閉じる

- ホーム
- 製品
- 価格
- ブログ
- 会社
- - [日本語](https://knowledge.amimoto-ami.com/knowledge/self-lets-encrypt)
    - [English](https://knowledge.amimoto-ami.com/en/knowledge/5.-enabling-https-using-lets-encrypt-on-amimoto-ami-2)
  
  
  
  
  
  
  日本語
  
  翻訳のサブメニューを表示
- [公式サイトへ移動](https://ja.amimoto-ami.com/)

[公式サイトへ移動](https://ja.amimoto-ami.com/)

 ヘルプセンター

- 検索フィールドが空なので、候補はありません。

1. [サポートドキュメント](https://knowledge.amimoto-ami.com/knowledge?hsLang=ja)
2. [Amimoto AMI](https://knowledge.amimoto-ami.com/knowledge/amimoto-ami?hsLang=ja)
3. [よくあるお問い合わせ](https://knowledge.amimoto-ami.com/knowledge/amimoto-ami?hsLang=ja#%E3%82%88%E3%81%8F%E3%81%82%E3%82%8B%E3%81%8A%E5%95%8F%E3%81%84%E5%90%88%E3%82%8F%E3%81%9B)

# Let's Encrypt は使えますか？

## セルフホスティングでご利用いただける、AmazonLinux 2 の最新バージョンの Amimoto では、以下の手順で Let's Encrypt のインストールが可能です。

このドキュメントでは、example.com のドメインに対して Let's Encrypt を使った SSL デジタル証明書をインストール・設定を行う手順について解説いたします。  
 

### 前提

- ドメインが取得済みであること
- DNS の各種ゾーン情報・レコードが設定されていること
- [http://example.com](http://example.com) 等のドメインでサーバへのアクセスが可能なこと
- WordPress のインストールが完了していること

### 作業内容

1. SSL デジタル証明書のインストール
2. SSL の設定
3. 証明書を自動更新する設定 (オプション)

### 1. ドメインの SSL デジタル証明書をインストールする

#### サーバへログインします

```
$ ssh -i ssh-key.pem ec2-user@example.com
```

#### root ユーザとして作業します

```
$ sudo su -
```

#### example.com へ 証明書をインストールする場合

**コマンド**

```
# letsencrypt certonly -t -d example.com \ -a webroot --webroot-path=/var/www/vhosts/example.com/ \ --rsa-key-size 2048 
```

**注意:** example.com の箇所は、ご利用のドメイン名と置換えて設定を行ってください。

#### Let's Encrypt からのメールを受取るために、メールアドレスを設定します:

```
Enter email address (used for urgent notices and lost key recovery) (Enter 'c'to cancel): info+letsencrypt@example.com ※
```

#### Let's Encrypt の利用既約に同意します:

この画面で\[a\] キーを入力し \[Enter\]/\[Return\] を押してください。

```
Please read the Terms of Service athttps://letsencrypt.org/documents/LE-SA-v1.1.1-August-1-2016.pdf. You must agreein order to register with the ACME server athttps://acme-v01.api.letsencrypt.org/directory-------------------------------------------------------------------------------(A)gree/(C)ancel: A
```

Let's Encrypt がサーバへインストールされました。

証明書及び証明書チェーンは以下のディレクトリに保管されています:

```
/etc/letsencrypt/live/example.com/fullchain.pem
```

また秘密鍵は以下のディレクトリに保管されています

```
/etc/letsencrypt/live/example.com/privkey.pem
```

### 2. SSL の設定

Let's Encript と SSL デジタル証明書のインストールまで完了しました。次は、証明書を利用するようサーバの設定ファイル (/etc/nginx/conf.d/example.com-ssl.conf) を変更します。既存の example.com.conf を複製しexample.com-ssl.conf とファイル名を変えて編集をします。

**注意:** [example.com](http://example.com) の箇所は、ご利用のドメイン名と置換えて設定を行ってください。

#### example.com 用の設定ファイルをコピーし編集します

**コマンド**

```
# cd /etc/nginx/conf.d# cp example.com.conf example.com-ssl.conf# vi example.com-ssl.conf  
```

**\[i\] キーを押してから編集を行ってください。**

**設定内容**

```
server {    listen      443 ssl http2;    server_name example.com;    root        /var/www/vhosts/example.com;    index       index.html index.htm;    charset     utf-8;    ssl_certificate     /etc/letsencrypt/live/example.com/fullchain.pem;    ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;    ssl_protocols  TLSv1 TLSv1.1 TLSv1.2;    ssl_prefer_server_ciphers on;    ssl_ciphers AESGCM:HIGH:!aNULL:!MD5;    ssl_session_cache   shared:SSL:10m;    ssl_session_timeout 5m;        access_log  /var/log/nginx/example.com-ssl.access.log  main;    error_log   /var/log/nginx/example.com-ssl.error.log;    include     /etc/nginx/drop;    add_header X-Cache-Status $upstream_cache_status;    expires $expires;    set $mobile "";    #include /etc/nginx/mobile-detect;    include     /etc/nginx/wp-front;    location ~* /(phpmyadmin|myadmin|pma) { access_log off; log_not_found off; return 404; }    #    # redirect server error pages to the static page /50x.html    #    error_page  502 503 504  /50x.html;    location = /50x.html {        root   /usr/share/nginx/html;    }}
```

**注意:** example.com の箇所は、ご利用のドメイン名と置換えて設定を行ってください。

編集が終ったら \[Esc\] を押し、続けて \[Shift\] キーを押しながら \[z\] を2回押して保存してください。

設定反映のため nginx を restart します。

**コマンド**

```
# service monit stop && service nginx restart# service monit start
```

加えて、すでに WordPress を独自ドメインで運用されていて HTTPS 接続を強制する場合は、/etc/nginx/conf.d/example.com.conf の内容に return 301 https://example.com$request\_uri; の1行を追加してください。

**コマンド**

```
# vi example.com.conf
```

**\[i\] キーを押してから編集を行ってください。**

**設定内容**

```
server {    listen      80;    server_name example.com;    root        /var/www/vhosts/example.com;    index       index.html index.htm;    charset     utf-8;    access_log  /var/log/nginx/example.com.access.log  main;    error_log   /var/log/nginx/example.com.error.log;    include     /etc/nginx/drop;    add_header X-Cache-Status $upstream_cache_status;    expires $expires;    set $mobile "";    #include /etc/nginx/mobile-detect;    location / {        return 301 https://example.com$request_uri;    }    #    # redirect server error pages to the static page /50x.html    #    error_page  502 503 504  /50x.html;    location = /50x.html {        root   /usr/share/nginx/html;    }}
```

編集が終ったら \[Esc\] を押してください。その後、\[Shift\] キーを押しながら \[z\] を2回押して保存してください。  
 その後、設定反映のため nginx を restart します。

```
# service monit stop && service nginx restart# service monit start
```

Let's Encrypt と SSL デジタル証明書の設定、サーバ設定の変更は以上です。

### 3. 証明書を自動更新する設定 (オプション)

Let's Encrypt は発行後90日で証明書の有効期限が切れるため、自動で証明書の更新を行うように設定をするとよいでしょう。

※ 毎週月曜日 AM1:00に letsencrypt renew を実行する場合

**コマンド**

以下の2行をコピーして、\[i\] キーを押してから crontab -e で開いた画面へペーストしてください。

```
# crontab -e
```

編集が終ったら \[Esc\] を押してください。その後、\[Shift\] キーを押しながら \[z\] を2回押して保存してください。

```
# Renewing Lets Encrypt certificate0 1 * * 1 /opt/letsencrypt/bin/letsencrypt renew && /sbin/service nginx restart > /dev/null 2>&1
```

証明書の自動更新設定は以上です。

- [Amimoto Managed Hosting](https://knowledge.amimoto-ami.com/knowledge/amimoto-managed-hosting?hsLang=ja#main-content)
  
  
  
  
  
    - [基本事項](https://knowledge.amimoto-ami.com/knowledge/amimoto-managed-hosting?hsLang=ja#%E5%9F%BA%E6%9C%AC%E4%BA%8B%E9%A0%85)
    - [スタートアップガイド](https://knowledge.amimoto-ami.com/knowledge/amimoto-managed-hosting?hsLang=ja#%E3%82%B9%E3%82%BF%E3%83%BC%E3%83%88%E3%82%A2%E3%83%83%E3%83%97%E3%82%AC%E3%82%A4%E3%83%89)
    - [他社サーバから移行したい](https://knowledge.amimoto-ami.com/knowledge/amimoto-managed-hosting?hsLang=ja#%E4%BB%96%E7%A4%BE%E3%82%B5%E3%83%BC%E3%83%90%E3%81%8B%E3%82%89%E7%A7%BB%E8%A1%8C%E3%81%97%E3%81%9F%E3%81%84)
    - [管理画面のご利用方法](https://knowledge.amimoto-ami.com/knowledge/amimoto-managed-hosting?hsLang=ja#%E7%AE%A1%E7%90%86%E7%94%BB%E9%9D%A2%E3%81%AE%E3%81%94%E5%88%A9%E7%94%A8%E6%96%B9%E6%B3%95)
    - [サーバー接続](https://knowledge.amimoto-ami.com/knowledge/amimoto-managed-hosting?hsLang=ja#%E3%82%B5%E3%83%BC%E3%83%90%E3%83%BC%E6%8E%A5%E7%B6%9A)
    - [ご契約・お支払い](https://knowledge.amimoto-ami.com/knowledge/amimoto-managed-hosting?hsLang=ja#%E3%81%94%E5%A5%91%E7%B4%84-%E3%81%8A%E6%94%AF%E6%89%95%E3%81%84)
    - [よくあるお問い合わせ](https://knowledge.amimoto-ami.com/knowledge/amimoto-managed-hosting?hsLang=ja#%E3%82%88%E3%81%8F%E3%81%82%E3%82%8B%E3%81%8A%E5%95%8F%E3%81%84%E5%90%88%E3%82%8F%E3%81%9B)
    - [トラブルシューティング](https://knowledge.amimoto-ami.com/knowledge/amimoto-managed-hosting?hsLang=ja#%E3%83%88%E3%83%A9%E3%83%96%E3%83%AB%E3%82%B7%E3%83%A5%E3%83%BC%E3%83%86%E3%82%A3%E3%83%B3%E3%82%B0)
    - [プリインストールされているプラグイン](https://knowledge.amimoto-ami.com/knowledge/amimoto-managed-hosting?hsLang=ja#%E3%83%97%E3%83%AA%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%95%E3%82%8C%E3%81%A6%E3%81%84%E3%82%8B%E3%83%97%E3%83%A9%E3%82%B0%E3%82%A4%E3%83%B3)
    - [ベンダー別 DNS 設定ガイド](https://knowledge.amimoto-ami.com/knowledge/amimoto-managed-hosting?hsLang=ja#%E3%83%99%E3%83%B3%E3%83%80%E3%83%BC%E5%88%A5-dns-%E8%A8%AD%E5%AE%9A%E3%82%AC%E3%82%A4%E3%83%89)
    - [活用 Tips (メール編)](https://knowledge.amimoto-ami.com/knowledge/amimoto-managed-hosting?hsLang=ja#%E6%B4%BB%E7%94%A8-tips-%E3%83%A1%E3%83%BC%E3%83%AB%E7%B7%A8)
    - [活用 Tips (キャッシュ編)](https://knowledge.amimoto-ami.com/knowledge/amimoto-managed-hosting?hsLang=ja#%E6%B4%BB%E7%94%A8-tips-%E3%82%AD%E3%83%A3%E3%83%83%E3%82%B7%E3%83%A5%E7%B7%A8)
    - [活用 Tips (運用編)](https://knowledge.amimoto-ami.com/knowledge/amimoto-managed-hosting?hsLang=ja#%E6%B4%BB%E7%94%A8-tips-%E9%81%8B%E7%94%A8%E7%B7%A8)
    - [活用 Tips (インテグレーション編)](https://knowledge.amimoto-ami.com/knowledge/amimoto-managed-hosting?hsLang=ja#%E6%B4%BB%E7%94%A8-tips-%E3%82%A4%E3%83%B3%E3%83%86%E3%82%B0%E3%83%AC%E3%83%BC%E3%82%B7%E3%83%A7%E3%83%B3%E7%B7%A8)
    - [活用 Tips (開発編)](https://knowledge.amimoto-ami.com/knowledge/amimoto-managed-hosting?hsLang=ja#%E6%B4%BB%E7%94%A8-tips-%E9%96%8B%E7%99%BA%E7%B7%A8)
    - [非推奨のプラグイン](https://knowledge.amimoto-ami.com/knowledge/amimoto-managed-hosting?hsLang=ja#%E9%9D%9E%E6%8E%A8%E5%A5%A8%E3%81%AE%E3%83%97%E3%83%A9%E3%82%B0%E3%82%A4%E3%83%B3)
    - [サービス全般](https://knowledge.amimoto-ami.com/knowledge/amimoto-managed-hosting?hsLang=ja#%E3%82%B5%E3%83%BC%E3%83%93%E3%82%B9%E5%85%A8%E8%88%AC)
    - [メンテナンス](https://knowledge.amimoto-ami.com/knowledge/amimoto-managed-hosting?hsLang=ja#%E3%83%A1%E3%83%B3%E3%83%86%E3%83%8A%E3%83%B3%E3%82%B9)
- [Amimoto AMI](https://knowledge.amimoto-ami.com/knowledge/amimoto-ami?hsLang=ja#main-content)
  
  
  
  
  
    - [基本的なご利用方法](https://knowledge.amimoto-ami.com/knowledge/amimoto-ami?hsLang=ja#%E5%9F%BA%E6%9C%AC%E7%9A%84%E3%81%AA%E3%81%94%E5%88%A9%E7%94%A8%E6%96%B9%E6%B3%95)
    - [サーバーへの接続](https://knowledge.amimoto-ami.com/knowledge/amimoto-ami?hsLang=ja#%E3%82%B5%E3%83%BC%E3%83%90%E3%83%BC%E3%81%B8%E3%81%AE%E6%8E%A5%E7%B6%9A)
    - [活用Tips](https://knowledge.amimoto-ami.com/knowledge/amimoto-ami?hsLang=ja#%E6%B4%BB%E7%94%A8tips)
    - [よくあるお問い合わせ](https://knowledge.amimoto-ami.com/knowledge/amimoto-ami?hsLang=ja#%E3%82%88%E3%81%8F%E3%81%82%E3%82%8B%E3%81%8A%E5%95%8F%E3%81%84%E5%90%88%E3%82%8F%E3%81%9B)
    - [トラブルシューティング](https://knowledge.amimoto-ami.com/knowledge/amimoto-ami?hsLang=ja#%E3%83%88%E3%83%A9%E3%83%96%E3%83%AB%E3%82%B7%E3%83%A5%E3%83%BC%E3%83%86%E3%82%A3%E3%83%B3%E3%82%B0)
- [\[EN\] Amimoto Managed Hosting](https://knowledge.amimoto-ami.com/knowledge/en-amimoto-managed-hosting?hsLang=ja#main-content)
  
  
  
  
  
    - [Migration tips for AMIMOTO Managed Hosting](https://knowledge.amimoto-ami.com/knowledge/en-amimoto-managed-hosting?hsLang=ja#migration-tips-for-amimoto-managed-hosting)

- ホーム
- 製品
- 価格
- ブログ
- 会社

[![Chill listening crop-3](https://knowledge.amimoto-ami.com/hs-fs/hubfs/Amimoto_Logomark_rgb.png?width=24&height=24&name=Amimoto_Logomark_rgb.png "Chill listening crop-3")](https://ja.amimoto-ami.com/)

Flexible Cloud WordPress Hosting

<https://www.facebook.com/AmimotoAMI/> <https://twitter.com/Amimoto_Ami>

Copyright © 2026, 株式会社デジタルキューブ