大网数据广告活动
服务器运维问答

Can I use single Let's Encrypt SSL certificate for subdomains on different servers?

· 52CE 我爱测

Currently I'm able to get a single Let's Encrypt SSL certificate working on one server with multiple subdomains. eg. m.example.com, www.example.com, example.com on Server A However, in order to use eg. cdn.example.com on Server B…

问题原文

原帖链接 · KDX · CC BY-SA 3.0

Currently I'm able to get a single Let's Encrypt SSL certificate working on one server with multiple subdomains.

eg. m.example.com, www.example.com, example.com on Server A

However, in order to use eg. cdn.example.com on Server B, how can I make the implementation?

My ideas are:

(1) single certificate on Server A, containing all subdomains: cdn.example.com, m.example.com, www.example.com, example.com, then rsync it to Server B

(2) one certificate on Server A, containing: m.example.com, www.example.com, example.com

second certificate on Server B, containing only: cdn.example.com

What's the correct way or best approach to make the implementation?

I'm not sure if I'm allow to generate multiple certificates regarding to one the root domain example.com

I find that (1) is easier when it comes to renewal in case I scale to multiple servers.

Can it be done this way? Or it's redundant?

UPDATE:

same SSL certificate in two servers does not fully address my question. The accepted solution partially answer that SSL cert is FQDN specific, and not machine specific.

If that's the case, isn't my proposed (1) a simplified solution?

My question is that:

Can I have a partial SSL cert containing only subdomain cdn.example.com but leave out the others on Server B then having another SSL cert issued for Server A with the root domain example.com, www.example.com, and m.example.com?

已采纳解答

原帖链接 · Jacob Evans · CC BY-SA 3.0

IMHO, Each server should have it's own private key, you can issue as many certs as you like with LE, the only reason I can think of to use multiple SANs per IP is if your clients cannot do SNI (example: old java clients if you're using webhooks/api's or other endpoints).

TLDR; option 2, just don't forget to set your auto-renewal cronjobs and enter a valid email in-case something went wrong.

Another reason I would use separate keys for your app/assets is different levels of trust. I assume your images don't matter as much as your code/content and you will not be submitting forms to your users via the CDN, Server A may be onsite and Server B in public cloud on SSD.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-02-06)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。