【问题标题】:Wildcard SSL is not showing on subdomains通配符 SSL 未显示在子域上
【发布时间】:2019-05-12 04:59:38
【问题描述】:

我有一个网站 mydomain.edu,托管在亚马逊服务器上。 我使用以下方法通过 putty 进行 shell 访问,为 *.mydomain.edu 安装了通配符 ssl 证书 - 我在 /etc/apache2/sites-available/mydomain.edu-ssl.conf 上找到了旧证书路径,并用新证书替换了旧证书、私钥和中间证书。并重新启动 apache 服务器。 一切正常,我在 mydomain.edu 上获得了新的 ssl 证书。

但是 ssl 证书不会显示在 sub1.mydomain.edu 和 sub2.mydomain.edu 上

我必须进行哪些更改才能应用相同的通配符证书? 我有大斌 - ubuntu 安装。

【问题讨论】:

    标签: ubuntu ssl amazon-ec2


    【解决方案1】:

    我只是为我需要使用通配符 SSL 来表达的所有子域创建了标记。 对于子域的每个标记,我创建了安全标记

    <VirtualHost _default_:443>
    
             ServerAdmin webmaster@localhost
             SSLEngine on
             SSLProtocol all
    
            ServerName sub1.mydomain.edu
            ServerAlias www.sub1.mydomain.edu
            DocumentRoot /home/path/to/mysubdomain/directory
            ErrorLog ${APACHE_LOG_DIR}/sub1.mydomain.edu.in_error.log
            CustomLog ${APACHE_LOG_DIR}/sub1.mydomain.edu.in_access.log combined
    
             SSLCertificateFile /etc/apache2/ssl/certificate.crt
             SSLCertificateKeyFile /etc/apache2/ssl/privatekey.key
             SSLCertificateChainFile /etc/apache2/ssl/intermediateCASSLca.crt
    
            <Directory "/home/path/to/mysubdomain/directory">
            Options Indexes FollowSymLinks MultiViews
            AllowOverride All
            Order allow,deny
            allow from all
            Require all granted
            </Directory>
    </VirtualHost>
    

    我为 unsecured to secure 重定向添加了以下行:-

    永久重定向/https://sub1.mydomain.edu

    <VirtualHost *:80>
             ServerName sub1.mydomain.edu
            ServerAlias www.sub1.mydomain.edu
            **Redirect permanent / https://www.sub1.mydomain.edu**
    
            ServerAdmin webmaster@localhost
            DocumentRoot /home/path/to/mysubdomain/directory
    
            ErrorLog ${APACHE_LOG_DIR}/sub1.mydomain.edu_error.log
            CustomLog ${APACHE_LOG_DIR}/sub1.mydomain.edu_access.log combined
    
            <Directory "/home/path/to/mysubdomain/directory">
            Options Indexes FollowSymLinks MultiViews
            AllowOverride All
            Order allow,deny
            allow from all
            </Directory>
    
    </VirtualHost>
    

    【讨论】:

      猜你喜欢
      • 2011-08-15
      • 1970-01-01
      • 2011-01-08
      • 2012-08-20
      • 2016-10-21
      • 1970-01-01
      • 2018-05-11
      • 2014-09-10
      相关资源
      最近更新 更多