网站可以在http子域上使用https和静态文件吗
can website use https and static files on http sub-domain
我想购买 ssl 许可证,我有两个选择。一个选项支持无限子域(通配符),另一个不支持。但它比 Wildcard ssl 便宜。
我的网站可以使用 php 编程并使用 https 协议和静态文件,如图像、css、js、另一个子域上的视频使用 http 协议吗?
你觉得这样做麻烦吗?
不,这不是使用 Mixed Content(http 上的资源,https 上的主要站点)的好主意,它会在大多数浏览器中自动被阻止,使您的页面看起来很奇怪并降低安全性。
在我看来,您有几个选择,从最好的+最便宜的开始:
使用 LetsEncrypt 等服务为您的子域获取免费证书,并在您的主站点上使用 non-wildcard 提供商。或者,如果您不需要 EV 证书(绿色 company-name),您也可以为您的主域获取 LetsEncrypt 证书。既省钱又安全。
购买 non-wildcard 证书并在同一域中拥有所有静态内容。
对于1和2,我建议你支持HTTP/2 -- the main reason why people started with using different subdomains for static content is to workaround the connection limiting of HTTP/1.x. With HTTP/2, all content is multiplexed, so there not always a true need for this behavior anymore. In fact, domain sharding可能会使性能变差。
我想购买 ssl 许可证,我有两个选择。一个选项支持无限子域(通配符),另一个不支持。但它比 Wildcard ssl 便宜。
我的网站可以使用 php 编程并使用 https 协议和静态文件,如图像、css、js、另一个子域上的视频使用 http 协议吗?
你觉得这样做麻烦吗?
不,这不是使用 Mixed Content(http 上的资源,https 上的主要站点)的好主意,它会在大多数浏览器中自动被阻止,使您的页面看起来很奇怪并降低安全性。
在我看来,您有几个选择,从最好的+最便宜的开始:
使用 LetsEncrypt 等服务为您的子域获取免费证书,并在您的主站点上使用 non-wildcard 提供商。或者,如果您不需要 EV 证书(绿色 company-name),您也可以为您的主域获取 LetsEncrypt 证书。既省钱又安全。
购买 non-wildcard 证书并在同一域中拥有所有静态内容。
对于1和2,我建议你支持HTTP/2 -- the main reason why people started with using different subdomains for static content is to workaround the connection limiting of HTTP/1.x. With HTTP/2, all content is multiplexed, so there not always a true need for this behavior anymore. In fact, domain sharding可能会使性能变差。