LoginSignup
1
1

More than 3 years have passed since last update.

BitnamiのRedmineでSSL化する方法

Last updated at Posted at 2020-08-10

はじめに

AWSのEC2上にBitnamiのRedmineを起動したのですが、常時SSL化したかったので設定してみました。

設定方法

公式のホームページに「Let's Encrypt証明書を自動構成する」というページがあったので、そちらを参考に設定しました。
公式ページ

設定用のツールを起動する

下記のコマンドを入力して、Let's Encryptの設定を行うツールを起動します。

ツールの起動コマンド
sudo /opt/bitnami/bncert-tool

起動が完了したら、下記の内容が表示されます。

起動完了時の画面
Welcome to the Bitnami HTTPS Configuration tool.

ドメインの設定

「Webサーバーを構成するドメインの有効なスペース区切りのリストを入力してください。」と表示されるので、Domain list []:の後ろにスペース区切りで記述します。

設定画面
Domains

Please provide a valid space-separated list of domains for which you wish to 
configure your web server.

Domain list []: 設定したいドメインをスペース区切りで記述する

WWWの設定

WWWを含んだドメインも登録しますか?と聞かれるのですが、今回は必要ないので、nと入力します。

WWWの設定
The following domains were not included: www.ドメイン名. Do you want to add them? [Y/n]: n

wwwを設定に含めなかった場合、
「警告:wwwドメイン(www.example.comなど)またはwww以外のドメイン(www.example.comなど)が指定されていないため、非wwwからwww、wwwから非wwwへのリダイレクトは無効になります。」
と注意点が表示されます。
今回は、問題無いので、Enterキーを押して次に進んでください。

wwwの注意
Warning: No www domains (e.g. www.example.com) or non-www domains (e.g. 
www.example.com) have been provided, so the following redirections will be 
disabled: non-www to www, www to non-www.
Press [Enter] to continue:

リダイレクトの設定

「Bitnamiインストールで有効または無効にするリダイレクトを選択してください。」と聞かれて、
「HTTPからHTTPSへのリダイレクトを有効にする」かどうかについて聞かれるので、yと入力してEnterキーを押す。

リダイレクトの設定
Enable/disable redirections

Please select the redirections you wish to enable or disable on your Bitnami 
installation.

Enable HTTP to HTTPS redirection [Y/n]: y

変更点の有効化

変更するためのステップが表示されるので、確認し、同意できる場合はyを入力して、Enterキーを押します。

変更ステップ和訳
実行する変更

次の変更がBitnamiインストールに対して実行されます。

1. Webサーバーを停止します
2.ドメインに無料のLet's Encrypt証明書を使用するようにWebサーバーを構成する
3.毎月証明書を自動的に更新するようにcronジョブを構成します
4. Webサーバー名を次のように設定します:redmine.msgaws.link
5. HTTPからHTTPSへのリダイレクトを有効にします(例:http://redmine.msgaws.linkをhttps://redmine.msgaws.linkにリダイレクトします)
6.すべての変更が実行されたら、Webサーバーを起動します

これらの変更に同意しますか? [はい/いいえ]:
変更ステップ
Changes to perform

The following changes will be performed to your Bitnami installation:

1. Stop web server
2. Configure web server to use a free Let's Encrypt certificate for the domains: 
redmine.msgaws.link
3. Configure a cron job to automatically renew the certificate each month
4. Configure web server name to: redmine.msgaws.link
5. Enable HTTP to HTTPS redirection (example: redirect 
http://redmine.msgaws.link to https://redmine.msgaws.link)
6. Start web server once all changes have been performed

Do you agree to these changes? [Y/n]: 

Let's Encryptの設定

処理が進むと、下記の内容が表示されます。
「Let's Encrypt証明書を関連付ける有効な電子メールアドレスを入力してください。」と表示されているので、自分のメールアドレスを入力してEnterキーを押します。

Emailの設定
Create a free HTTPS certificate with Let's Encrypt

Please provide a valid e-mail address for which to associate your Let's Encrypt 
certificate.

Domain list: ドメイン名

Server name: ドメイン名

E-mail address []: 自分のメールアドレスをここに記載する

Emailの入力が完了したら、
「Let's Encryptサブスクライバー契約に同意しますか?」
と聞かれるので、yと入力し、Enterキーを押します。

サブスクライバーの確認
The Let's Encrypt Subscriber Agreement can be found at:

https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf

Do you agree to the Let's Encrypt Subscriber Agreement? [Y/n]: y

変更結果

下記のように「Success」と表示されれば、変更は完了しています。

変更結果
Performing changes to your installation

The Bitnami HTTPS Configuration Tool will perform any necessary actions to your 
Bitnami installation. This may take some time, please be patient.

----------------------------------------------------------------------------
Success

The Bitnami HTTPS Configuration Tool succeeded in modifying your installation.

The configuration report is shown below.

Backup files:
* /opt/bitnami/apache2/conf/httpd.conf.back.202008102248
* /opt/bitnami/apache2/conf/bitnami/bitnami-apps-prefix.conf.back.202008102248
* /opt/bitnami/apache2/conf/bitnami/bitnami.conf.back.202008102248

Find more details in the log file:

/tmp/bncert-202008102248.log

If you find any issues, please check Bitnami Support forums at:

https://community.bitnami.com

Press [Enter] to continue:
1
1
0

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
1
1