Home>

I am rebuilding the server with CentOS 7.9.

I have Apache settings in it, but it doesn't start easily.

Looking at the 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

It has become.
I have an SSL certificate with CertBot, but I don't know what the Private key not found on the first line points to.

[~] # 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 date 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)

November 22 23:57:33 systemd [1]: Starting The Apache HTTP Server ...
November 22 23:57:33 systemd [1]: httpd.service: main process exited, code = exited, status = 1/FAILURE
November 22 23:57:33 systemd [1]: Failed to start The Apache HTTP Server.
November 22 23:57:33 systemd [1]: Unit httpd.service entered failed state.
November 22 23:57:33 systemd [1]: httpd.service failed.

How can Apache start and be accessible at 443?

[2020/11/23 07:58 postscript]
After reviewing ssl.conf and moving Apache, the error changed to the following.

--Subject: Unit httpd.service has begun start-up
--Define-By: systemd
--Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-
--Unit httpd.service has begun starting up.
November 23 07:47:55 httpd [10825]: (98) Address already in use: AH00072: make_sock: could not bind to address [::]: 443
November 23 07:47:55 systemd [1]: httpd.service: main process exited, code = exited, status = 1/FAILURE
November 23 07:47:55 systemd [1]: Failed to start The Apache HTTP Server.
--Subject: Unit httpd.service has failed
--Define-By: systemd
--Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-
--Unit httpd.service has failed.
-
--The result is failed.
November 23 07:47:55 systemd [1]: Unit httpd.service entered failed state.
November 23 07:47:55 systemd [1]: httpd.service failed.
November 23 07:52:54 systemd [1]: Starting The Apache HTTP Server ...
--Subject: Unit httpd.service has begun start-up
--Define-By: systemd
--Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
code