简体   繁体   中英

Apache2.4 - SSL Certificate Installation is not working

I am currently trying to install an SSL certificate which is issued by Client. I am however currently having issues. In the error log, I have this error:

在此处输入图片说明

My httpd-ahssl.conf file configuration is -

##
## SSL Virtual Host Context
##

<VirtualHost _default_:443>
  SSLEngine on
  ServerName RIL15066YJB152:443
  RewriteEngine On
  #RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
  RewriteCond %{THE_REQUEST} !^(POST|GET)\ /.*\ HTTP/1\.1$
  RewriteRule .* - [F]
  SSLCertificateFile "${SRVROOT}/conf/ssl/iperspective.cer"
  SSLCertificateKeyFile "${SRVROOT}/conf/ssl/iperspective.openssl"
  DocumentRoot "${SRVROOT}/htdocs"
# DocumentRoot access handled globally in httpd.conf
    CustomLog "${SRVROOT}/logs/ssl_request.log" \
          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
    <Directory "${SRVROOT}/htdocs">
        Options Indexes Includes FollowSymLinks
        AllowOverride AuthConfig Limit FileInfo
    Require all granted
    </Directory>
    FileETag none
</virtualhost>

I am using Apache server version- 2.4. Same certificates work fine with Apache-2.2. I'm not too familiar with setting up certificates with apache, so any help you could provide is appreciated.

Reading your log file I can understand that your certificate format is not correct. You say that worked well on another version of Apache, that confirms the problem is the format, not the certificate.

You have to convert the binary format of your .cer certificate to obtein a base-64 encoding certificate. Simply run this command:

openssl x509 -inform DER -in certificatename.cer -out certificatename.crt

Note that .crt is a binary X.509 certificate, and it is also encapsulated in text (base-64) encoding.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM