See server name according to SSL certificates

后端 未结 2 2013
無奈伤痛
無奈伤痛 2020-12-31 13:27

I have a problem installing the SSL certificates. The problem i think the server name doesn\'t match the certificate\'s server name.

Here the exact Apache problem:

相关标签:
2条回答
  • 2020-12-31 13:49

    I had this warning in ssl_error_log:

    [Wed Dec 11 14:02:41 2013] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
    [Wed Dec 11 14:02:41 2013] [warn] RSA server certificate CommonName (CN) `localhost.localdomain' does NOT match server name!?
    

    It is because that mod_ssl in CentOS (5.10) came with a default virtualhost which will use the default cert in /etc/pki/tls/certs/localhost.crt....

    I removed the virtualhost section in conf.d/ssl.conf and the warning disappeared after reloading apache.

    0 讨论(0)
  • 2020-12-31 14:13

    You have to set the Server's DNS name first:

    so perform the command
    $ sudo gksu gedit  /etc/hostname  to edit the hostname file
    add the line www.example.com
    
    $ sudo  /etc/hosts and add the line:
    127.0.0.1   www.example.com localhost
    

    After that make sure to use that domain name in creating or signing the certificate

    0 讨论(0)
提交回复
热议问题