Я не можу запустити Apache на сервері CentOS з SELinux. Журнал помилок дає.
[root@server httpd]# cat test-error_log
[Wed Nov 15 05:42:34 2017] [error] Init: Private key not found
[Wed Nov 15 05:42:34 2017] [error] SSL Library Error: 218529960 error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag
[Wed Nov 15 05:42:34 2017] [error] SSL Library Error: 218640442 error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error
[Wed Nov 15 05:42:34 2017] [error] SSL Library Error: 218529960 error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag
[Wed Nov 15 05:42:34 2017] [error] SSL Library Error: 218595386 error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error
[Wed Nov 15 05:42:34 2017] [error] SSL Library Error: 67710980 error:04093004:rsa routines:OLD_RSA_PRIV_DECODE:RSA lib
[Wed Nov 15 05:42:34 2017] [error] SSL Library Error: 218529960 error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag
[Wed Nov 15 05:42:34 2017] [error] SSL Library Error: 218595386 error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error
Тут також не вдається
[root@server private]# openssl rsa -in test.key -check -noout
unable to load Private Key
140598241089352:error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag:tasn_dec.c:1319:
140598241089352:error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error:tasn_dec.c:381:Type=RSA
140598241089352:error:04093004:rsa routines:OLD_RSA_PRIV_DECODE:RSA lib:rsa_ameth.c:115:
140598241089352:error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag:tasn_dec.c:1319:
140598241089352:error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error:tasn_dec.c:381:Type=PKCS8_PRIV_KEY_INFO
140598241089352:error:0907B00D:PEM routines:PEM_READ_BIO_PRIVATEKEY:ASN1 lib:pem_pkey.c:132:
Шлях знаходиться у файлі conf
[root@server conf]# cat /etc/httpd/conf.d/test.conf
<VirtualHost *:443>
ServerAdmin webmaster@server.com
DocumentRoot /var/www/html/test
ServerName server.server.com
SSLEngine on
SSLProtocol all -SSLv2 -SSLv3
SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
SSLCertificateFile /etc/pki/tls/certs/test.crt
SSLCertificateKeyFile /etc/pki/tls/private/test.key
ErrorLog logs/test-error_log
CustomLog logs/test-access_log common
Я також перевірив, що в закритому ключі немає пробілів. Інші ідеї, де це відбувається неправильно?
Також
[root@server etc]# ls -dZ /etc/pki/tls/private/
drwxr-xr-x. root root system_u:object_r:httpd_sys_content_t:s0 /etc/pki/tls/private/
[root@server etc]# ls -dZ /etc/pki/tls/certs/
drwxr-xr-x. root root system_u:object_r:httpd_sys_content_t:s0 /etc/pki/tls/certs/