CentOS7.9でサーバを再構築しています。
その中でApacheの設定をしているのですが、なかなか起動しません。
ssl-error-logを見ると、
[Sun Nov 22 21:51:03.018762 2020] [ssl:error] [pid 2759] AH02203: Init: Private key not found [Sun Nov 22 21:51:03.018791 2020] [ssl:error] [pid 2759] SSL Library Error: error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag [Sun Nov 22 21:51:03.018803 2020] [ssl:error] [pid 2759] SSL Library Error: error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error [Sun Nov 22 21:51:03.018811 2020] [ssl:error] [pid 2759] SSL Library Error: error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag [Sun Nov 22 21:51:03.018820 2020] [ssl:error] [pid 2759] SSL Library Error: error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error (Type=RSA) [Sun Nov 22 21:51:03.018829 2020] [ssl:error] [pid 2759] SSL Library Error: error:04093004:rsa routines:OLD_RSA_PRIV_DECODE:RSA lib [Sun Nov 22 21:51:03.018838 2020] [ssl:error] [pid 2759] SSL Library Error: error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag [Sun Nov 22 21:51:03.018846 2020] [ssl:error] [pid 2759] SSL Library Error: error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error (Type=PKCS8_PRIV_KEY_INFO) [Sun Nov 22 21:56:18.109883 2020] [ssl:warn] [pid 2832] AH01909: RSA certificate configured for mydomain:443 does NOT include an ID which matches the server name [Sun Nov 22 22:17:25.035450 2020] [ssl:warn] [pid 3904] AH01909: RSA certificate configured for www.mydomin:443 does NOT include an ID which matches the server name [Sun Nov 22 22:17:31.604176 2020] [ssl:warn] [pid 3918] AH01909: RSA certificate configured for www.mydomain:443 does NOT include an ID which matches the server name
となっています。
CertBotでSSL証明書は取れているのですが、1行目のPrivate key not foundが何を指しているかわかりません。
[ ~]# systemctl status httpd.service
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since 日 2020-11-22 23:57:33 JST; 8s ago
Docs: man:httpd(8)
man:apachectl(8)
Process: 3862 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 3862 (code=exited, status=1/FAILURE)
11月 22 23:57:33 systemd[1]: Starting The Apache HTTP Server...
11月 22 23:57:33 systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
11月 22 23:57:33 systemd[1]: Failed to start The Apache HTTP Server.
11月 22 23:57:33 systemd[1]: Unit httpd.service entered failed state.
11月 22 23:57:33 systemd[1]: httpd.service failed.
どうしたらApacheが起動し、443でアクセスできるようになるでしょうか。
[2020/11/23 07:58追記]
ssl.confを見直し、Apacheを移動させたところ、以下のようなエラーに変わりました。
11月
1-- Subject: Unit httpd.service has begun start-up 2-- Defined-By: systemd 3-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel 4-- 5-- Unit httpd.service has begun starting up. 611月 23 07:47:55 httpd[10825]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:443 711月 23 07:47:55 systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE 811月 23 07:47:55 systemd[1]: Failed to start The Apache HTTP Server. 9-- Subject: Unit httpd.service has failed 10-- Defined-By: systemd 11-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel 12-- 13-- Unit httpd.service has failed. 14-- 15-- The result is failed. 1611月 23 07:47:55 systemd[1]: Unit httpd.service entered failed state. 1711月 23 07:47:55 systemd[1]: httpd.service failed. 1811月 23 07:52:54 systemd[1]: Starting The Apache HTTP Server... 19-- Subject: Unit httpd.service has begun start-up 20-- Defined-By: systemd 21-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel 22コード
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。