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

Fix missing ssl-cert for subdomain www. using redirect or similar

· 52CE 我爱测

We're using setup with an nginx on one machine and (currently) one application server on apache in the back. For multiple domains we got ssl certs, but only for the domain itself. So without subdomain www. Everything works as exp…

问题原文

原帖链接 · j.fiedler · CC BY-SA 3.0

We're using setup with an nginx on one machine and (currently) one application server on apache in the back.

For multiple domains we got ssl certs, but only for the domain itself. So without subdomain www. Everything works as expected, we do not use the https://www.domain.tld anywhere. But we have customers who are typing this in by hand, resulting in a warning in the browser on the clientside. ..and a new seo guy insisting on working www subdomain WITH ssl.

What am i looking for: A creative solution which does not require new certificates for 20+ domains.

I already thought about getting certificates from let's encrypt for our www subdomain, then 301 to domain.tld.. but it's still in beta.

Any ideas ?

已采纳解答

原帖链接 · Jenny D · CC BY-SA 3.0

You cannot solve this without getting new SSL certificates. Redirection won't help, since the SSL certificate is getting checked before the actual HTTP session starts. ETA So you need new certificates, either wildcard ones or ones with Subject Alternate Names (SAN), which are valid for a list of DNS names instead of just one. EOE

If it had been possible to do the redirect without SSL certificate errors, that would make it possible to set up fake redirects for e.g. misspelled banking sites to a scammer - so the fact that you can't do this is expected and proper behaviour from a security standpoint.

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

资料来源与适用范围

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

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

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