[英]Wildcard SSL certificates for multiple subdomain
我有一個有多個客戶端的系統。 每個客戶端都有自己的子域。
client1.example.com
client2.example.com
...
在服務器端,所有請求都被重定向到*.example.com
。 然后我的業務邏輯讀取子域(如client1
)並相應地響應客戶端。
所以基本上,我不會在服務器上配置每個子域。 我只是將它添加到我的數據庫中,我的代碼會正確處理它。
我正在嘗試將通配符 SSL 證書應用於所有這些子域。 另外,我希望所有未來的客戶都能自動獲取https
。
但我不知道如何配置它。 我曾嘗試使用Let's Encrypt
,但沒有成功。 實際域example.com
獲取https
而不是客戶端域。
任何有關配置的幫助都會非常有幫助。 或者,可能是這種設置是不可能的。 我不知道。
請幫忙。
PS example.com
只是我所指的虛擬域。
PPS 我在 Ubuntu 16.04 x64 上使用 apache2 Web 服務器
嗯,這是可能的。 我現在有一個*.example.com
的證書,它適用於我所有的任意子域,即,
client1.example.com
client2.example.com
...
我按照以下步驟操作:
$ wget https://dl.eff.org/certbot-auto
$ chmod a+x ./certbot-auto
$ sudo ./certbot-auto certonly \
--server https://acme-v02.api.letsencrypt.org/directory \
--manual --preferred-challenges dns \
-d *.example.com
然后使用在/etc/letsencrypt/live/example.com/
創建的文件,我從我的控制面板更新了值(我使用Vestacp
)
cat /etc/letsencrypt/live/example.com/cert.pem
^ Copy contents into “SSL Certificate” field.
cat /etc/letsencrypt/live/example.com/privkey.pem
^ Copy contents into “SSL Key” field.
cat /etc/letsencrypt/live/example.com/chain.pem
^ Copy contents into “SSL CA / Intermediate” field.
根據您的控制面板進行更改。
請按照本文了解詳細步驟和說明。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.