


このサイトをRapidSSLの証明書を導入してhttps化しました
SSLサーバ証明書をインストール (1)
http://www.rootlinks.net/2014/09/13/install-ssl-server-certification-1/
SSLサーバ証明書をインストール (2)
http://www.rootlinks.net/2014/09/13/install-ssl-server-certification-2/
SSLサーバ証明書をインストール (3)
http://www.rootlinks.net/2014/09/13/install-ssl-server-certification-3/
SSLサーバ証明書をインストール (4)
http://www.rootlinks.net/2014/09/13/install-ssl-server-certification-4/
秘密鍵作成時にパスワードを設定したのでApache SSLが有効になるとhttpd起動時にそのパスワード入力を要求されます
1 2 3 4 5 6 7 8 9 10 11 12 |
[root@host1 sslkey]# apachectl -t Syntax OK [root@host1 sslkey]# /etc/init.d/httpd restart httpd を停止中: [ OK ] httpd を起動中: Apache/2.x.x mod_ssl/2.x.x (Pass Phrase Dialog) Some of your private key files are encrypted for security reasons. In order to read them you have to provide the pass phrases. Server www.rootlinks.net:443 (RSA) Enter pass phrase: OK: Pass Phrase Dialog successful. [ OK ] |
これではサーバ再起動時に毎回入力する作業が必要になります
これを回避する方法は沢山のWebサイトで紹介されていますが、今回参考にさせて頂いたサイトは下記です
SSLのパスフレーズ(Pass Phrase Dialog)入力を省略してApacheを起動する
http://www.linux-tech.info/web/entry-42.html
当方ではパスフレーズ応答スクリプトを設定することにしました
- スクリプト作成
- 実行権限
- ssl.confの編集
- Apache再起動
1 2 3 |
[root@host1 ~]# vi /etc/httpd/shell/pass_phrase.sh #!/bin/sh echo "SSL password" |
1 2 3 |
[root@host1 ~]# chmod 500 /etc/httpd/shell/pass_phrase.sh [root@host1 ~]# ls -l /etc/httpd/shell/pass_phrase.sh -r-x------ 1 root root 36 9月 13 10:28 /etc/httpd/shell/pass_phrase.sh |
1 2 3 |
[root@host1 ~]# vi /etc/httpd/conf.d/ssl.conf #SSLPassPhraseDialog builtin SSLPassPhraseDialog exec:/etc/httpd/shell/pass_phrase.sh |
1 2 3 |
[root@host1 ~]# /etc/init.d/httpd restart httpd を停止中: [ OK ] httpd を起動中: [ OK ] |
再起動に失敗した場合はshellのパス,パスワードの記述,実行権限など各ファイルの記述を確認して下さい
1 2 3 |
[root@host1 ~]# /etc/init.d/httpd restart httpd を停止中: [ OK ] httpd を起動中: [失敗] |