2017-05-13 101 views
-2

我有一個帶有2個連接域的Apache 2服務器。我使用Let's Encrypt提供的證書。然而,我的問題是,只有第一個域名的證書可用(1.webpage.com)。但SSL適用於這兩個域。 這是我的配置文件Apache2具有子域的多個SSL證書不起作用

<IfModule mod_ssl.c> 
<VirtualHost *:443> 

    ServerName 1.webpage.com 
    ServerAdmin [email protected] 
    DocumentRoot /var/www 
    SSLEngine on 
    #LogLevel info ssl:warn 

    ErrorLog ${APACHE_LOG_DIR}/error.log 
    CustomLog ${APACHE_LOG_DIR}/access.log combined 

    #Include conf-available/serve-cgi-bin.conf 
    SSLCertificateFile /etc/letsencrypt/live/1.webpage.com/fullchain.pem 
    SSLCertificateKeyFile /etc/letsencrypt/live/1.webpage.com/privkey.pem 
    Include /etc/letsencrypt/options-ssl-apache.conf 
</VirtualHost> 

<VirtualHost *:443> 
    ServerName 2.webpage.com 
    DocumentRoot /var/www/2 

    SSLCertificateFile /etc/letsencrypt/live/2.webpage.com/fullchain.pem 
    SSLCertificateKeyFile /etc/letsencrypt/live/2.webpage.com/privkey.pem 
    Include /etc/letsencrypt/options-ssl-apache.conf 
</VirtualHost> 

乾杯

+0

如果現在有效(根據您的刪除答案判斷),您可以刪除您的問題。 –

回答

0

嘗試添加NameVirtualHost指令。

NameVirtualHost *:443 
<IfModule mod_ssl.c> 
<VirtualHost *:443> 
    ServerName 1.webpage.com 
    ... 
</VirtualHost>