識者の皆様へ件名について質問させていただきます。
さくらVPSにラピッドSSLを導入しようとし、以下のようなエラーが
取り除くことができない状況です。
対応した内容をまとめますので、お力をお貸しいただきたいです。
(かれこれ1日以上ハマってしまいました・・・)
■環境
さくらVPS(CentOS7)
お名前comで取得したドメイン
ラピッドSSL
■対応した内容
①さくらVPSでCentOS7をインストールして、LAMP環境を構築
②お名前comで取得したドメインを設定
③「http」アクセス時は問題なくシステムが見える(使える)ことを確認
④ラピッドSSLにて契約、各種サーバ証明書を設定
⑤設定後、「http」「https」両方ともアクセス不能
⑥設定ファイルの記載方法設置場所等を見直し、試行錯誤をしています
■参考にさせていただいたURL
https://qiita.com/yoshizaki_kkgk/items/e6f39a5bfb99900b44b2
■発生しているエラー
「service httpd restart」を入力すると、apacheが起動しないので、
「systemctl status httpd.service」と入力した結果、以下のようなエラーになることを確認しました。
(サーバ名とドメイン部分は便宜上xxxxxxxxxにしています)
apache
1● httpd.service - The Apache HTTP Server 2 Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled) 3 Active: failed (Result: exit-code) since 火 2018-03-06 11:30:52 JST; 2min 28s ago 4 Docs: man:httpd(8) 5 man:apachectl(8) 6 Process: 2276 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE) 7 Process: 2274 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE) 8 Main PID: 2274 (code=exited, status=1/FAILURE) 9 10 3月 06 11:30:52 vs.sakura.ne.jp httpd[2274]: In order to read them you have to provide the pass phrases. 11 3月 06 11:30:52 vs.sakura.ne.jp httpd[2274]: Server xxxxxxxxx.net:443 (RSA) 12 3月 06 11:30:52 vs.sakura.ne.jp httpd[2274]: Enter pass phrase:Apache:mod_ssl:Error: Private key not found. 13 3月 06 11:30:52 vs.sakura.ne.jp httpd[2274]: **Stopped 14 3月 06 11:30:52 vs.sakura.ne.jp systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE 15 3月 06 11:30:52 vs.sakura.ne.jp kill[2276]: kill: cannot find process "" 16 3月 06 11:30:52 vs.sakura.ne.jp systemd[1]: httpd.service: control process exited, code=exited status=1 17 3月 06 11:30:52 vs.sakura.ne.jp systemd[1]: Failed to start The Apache HTTP Server. 18 3月 06 11:30:52 vs.sakura.ne.jp systemd[1]: Unit httpd.service entered failed state. 19 3月 06 11:30:52 vs.sakura.ne.jp systemd[1]: httpd.service failed.
■備考
・サーバ側のSSL設定手順については、バーチャルホストを使用
「xxxxxxxxx.net」にアクセスすると、「/var/www/html/xxxxxxxxx/」が見えることを想定しています。
・apacheのバージョンは2.4.6
・各設定ファイルのおき場所は以下のようにしました。
ssl関係のファイル
apache
1/etc/httpd/conf/ssl.crt/internal.crt 2/etc/httpd/conf/ssl.crt/server.crt 3/etc/httpd/conf/ssl.key/server.key
設定ファイル
apache
1/etc/httpd/conf.d/vhost.conf 2/etc/httpd/conf.d/ssl.conf
・ssl.confは、色々試行錯誤したところ、現在は全てコメントアウトしています。
・vhost.confは以下のように記載しました。
(色々と設定項目や値を調整していたので、漏れや抜けがあるかもしれませんが、現在の最終系です)
apache
1<VirtualHost *:80> 2 DocumentRoot /var/www/html 3 # ServerName 4</VirtualHost> 5 6# setting for ssl 7LoadModule ssl_module modules/mod_ssl.so 8Listen 443 9#NameVirtualHost *:443 10 11SSLPassPhraseDialog builtin 12SSLSessionCache shmcb:/var/cache/mod_ssl/scache(512000) 13SSLSessionCacheTimeout 300 14#SSLMutex default 15Mutex default ssl-cache 16SSLRandomSeed startup file:/dev/urandom 256 17SSLRandomSeed connect builtin 18SSLCryptoDevice builtin 19 20# setting for caratinc.jp domain 21<VirtualHost *:443> 22 SSLEngine on 23 SSLProtocol all -SSLv2 -SSLv3 24 25 SSLCertificateChainFile /etc/httpd/conf/ssl.crt/internal.crt 26 SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt 27 SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key 28 29 DocumentRoot /var/www/html/xxxxxxxxx 30 ServerName xxxxxxxxx:443 31 32 CustomLog logs/xxxxxxxxx.net_ssl.access_log common 33 ErrorLog logs/xxxxxxxxx.net_ssl.error_log 34 35 AddDefaultCharset UTF-8 36 <Directory "/var/www/html/xxxxxxxxx"> 37 AllowOverride All 38 Options Indexes FollowSymLinks 39 </Directory> 40</VirtualHost>
以上になります。
エラー内容が明確に分かってはいるのですが、色々と試行錯誤しても解決に至っておりません。
何卒どうぞよろしくお願い致します。

回答2件
あなたの回答
tips
プレビュー