Discourse/Dockerのインストール

Let’s EncryptによるSSL接続に対応させます。

Let’s Encryptをインストールしたディレクトリに移動します。

$ cd /opt/letsencrypt

certbot-autoによりApacheのSSL設定ファイル、SSL認証ファイルの作成などを実行します。

$ sudo certbot --apache -d sub_domain2.example.com

httpへのアクセスをhttpsへリダイレクトするかどうか以下メッセージが表示されるので番号を入力して下さい。

Please choose whether HTTPS access is required or optional.
-------------------------------------------------------------------------------
1: Easy - Allow both HTTP and HTTPS access to these sites
2: Secure - Make all requests redirect to secure HTTPS access
-------------------------------------------------------------------------------
Select the appropriate number [1-2] then [enter] (press 'c' to cancel):

参考サイト