apache 2上的通配符SSL证书

时间:2013-05-20 06:38:47

标签: apache ssl

出于某种原因,SSL在主域www.domainname.com / domainname.com上正常运行 但它不适用于子域名(我得到“此连接不受信任”) 以下是我经历的步骤:

  1. 创建了服务器证书

    openssl req -new -newkey rsa:2048 -nodes -keyout domainname.key -out domainname.csr

  2. 在域名上输入* .domainname

  3. 将证书内容复制到SSL证书供应商

  4. 下载了生成的证书
  5. on httpd.conf
  6.     DocumentRoot "/opt/bitnami/apps/wordpress/htdocs"
    
        ServerName domainname.com
    
        ServerAlias *.domainname.com
    
        ServerAdmin admin@domainname.com
    
        ErrorLog "/opt/bitnami/apache2/logs/https_error_log"
    
        TransferLog "/opt/bitnami/apache2/logs/https_access_log"
    
        SSLEngine on
    
        SSLCertificateFile "/opt/bitnami/apache2/conf/domainname.com.crt"
    
        SSLCertificateKeyFile "/opt/bitnami/apache2/conf/domainname.key"
    
        SSLCertificateChainFile "/opt/bitnami/apache2/conf/gd_bundle.crt"
    
        <FilesMatch "\.(cgi|shtml|phtml|php)$">
    
            SSLOptions +StdEnvVars
    
        </FilesMatch>
    
        <Directory "/opt/bitnami/apache2/cgi-bin">
    
            SSLOptions +StdEnvVars
    
        </Directory>
    
        BrowserMatch "MSIE [2-5]" \
                 nokeepalive ssl-unclean-shutdown \
                 downgrade-1.0 force-response-1.0
    
        CustomLog "/opt/bitnami/apache2/logs/ssl_request_log" \
                  "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
    
    </VirtualHost> 
    

    DocumentRoot "/opt/bitnami/apps/wordpress/htdocs" ServerName domainname.com ServerAlias *.domainname.com ServerAdmin admin@domainname.com ErrorLog "/opt/bitnami/apache2/logs/https_error_log" TransferLog "/opt/bitnami/apache2/logs/https_access_log" SSLEngine on SSLCertificateFile "/opt/bitnami/apache2/conf/domainname.com.crt" SSLCertificateKeyFile "/opt/bitnami/apache2/conf/domainname.key" SSLCertificateChainFile "/opt/bitnami/apache2/conf/gd_bundle.crt" <FilesMatch "\.(cgi|shtml|phtml|php)$"> SSLOptions +StdEnvVars </FilesMatch> <Directory "/opt/bitnami/apache2/cgi-bin"> SSLOptions +StdEnvVars </Directory> BrowserMatch "MSIE [2-5]" \ nokeepalive ssl-unclean-shutdown \ downgrade-1.0 force-response-1.0 CustomLog "/opt/bitnami/apache2/logs/ssl_request_log" \ "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b" </VirtualHost>

0 个答案:

没有答案