简体   繁体   English

如何在共享主机中将 SSL 从 Windows 传输到 Linux 服务器?

[英]How to transfer SSL from Windows to Linux server in shared hosting?

I've found some tutorials about transferring SSL from Windows to Linux server such as this one here: https://major.io/2007/03/23/exporting-ssl-certificates-from-windows-to-linux/ .我找到了一些关于将 SSL 从 Windows 传输到 Linux 服务器的教程,例如这里的教程: https : //major.io/2007/03/23/exporting-ssl-certificates-from-windows-to-linux/ But is it possible to do something like this in shared hosting because in shared hosting Apache configuration may not be allowed?但是是否有可能在共享主机中做这样的事情,因为在共享主机中可能不允许 Apache 配置?

In Shared hosting, you won't have access to the webserver (IIS and Apache) to export and import SSL Certificates.在共享主机中,您将无法访问网络服务器(IIS 和 Apache)来导出和导入 SSL 证书。 For that, you will have to contact your hosting service provider to transfer the SSL Certificate.为此,您必须联系您的托管服务提供商以传输 SSL 证书。

Recently, I've moved SSL Certificate from my Windows VPS to Linux VPS with the help of the following article.最近,我在以下文章的帮助下将 SSL 证书从我的 Windows VPS 移到了 Linux VPS。

https://www.sslsupportdesk.com/move-certificate-iis-apache/ https://www.sslsupportdesk.com/move-certificate-iis-apache/

I am sure that the above link will be helpful if you want to move the SSL Certificate from Windows VPS to Linux VPS.如果您想将 SSL 证书从 Windows VPS 移动到 Linux VPS,我相信上面的链接会有所帮助。

Well it is possible to transfer an SSL certificate from a Windows (IIS) environment to a Linux (Apache) environment.那么可以将 SSL 证书从 Windows (IIS) 环境传输到 Linux (Apache) 环境。 Within a shared hosting environment, (at least the majority of them) it will not be possible to install the SSL certificate to the hosting account without the help of your hosting provider.在共享主机环境中,(至少是大多数)如果没有主机提供商的帮助,将无法将 SSL 证书安装到主机帐户。 The SSL installation requires an IP be allocated to your domain within the server's configuration, unless deployed with SNI, and a VirtualHost entry routing requested to port 443 (TLS/SSL) for your domain on that IP will have to be created. SSL 安装需要在服务器配置中为您的域分配一个 IP,除非使用 SNI 进行部署,并且必须为该 IP 上的域创建一个请求到端口 443 (TLS/SSL) 的 VirtualHost 条目路由。 Needless to say these configurations affect the server as a whole and are chargeable services so most providers will not provide you direct access to do this.毋庸置疑,这些配置会影响整个服务器并且是收费服务,因此大多数提供商不会为您提供直接访问权限。 If your provider uses Plesk or cPanel or Vdeck then this is the case.如果您的提供商使用PleskcPanelVdeck则属于这种情况。

That being said it is well worth the money to have your hosting provider complete this configuration for you and the related services are generally pretty cheap.话虽如此,让您的托管服务提供商为您完成此配置是非常值得的,而且相关服务通常非常便宜。 Most providers will average around $20.00 per year for all the services required to have your SSL function on their servers.对于在其服务器上具有 SSL 功能所需的所有服务,大多数提供商的平均每年约为 20.00 美元。

I would request information from your provider regarding the installation to see if it is the right solution for you.我会要求您的提供商提供有关安装的信息,以查看它是否适合您。

As a note Windows (IIS) SSL certificates are commonly PKCS#12/PFX Formated.请注意,Windows (IIS) SSL 证书通常采用 PKCS#12/PFX 格式。 The PKCS#12 or PFX format is a binary format for storing the server certificate, any intermediate certificates, and the private key in one encryptable file. PKCS#12 或 PFX 格式是一种二进制格式,用于将服务器证书、任何中间证书和私钥存储在一个可加密文件中。 PFX files usually have extensions such as .pfx and .p12. PFX 文件通常具有扩展名,例如 .pfx 和 .p12。 PFX files are typically used on Windows machines to import and export certificates and private keys. PFX 文件通常在 Windows 机器上用于导入和导出证书和私钥。 Linux (Apache) will use PEM formatted certificates.The PEM format is the most common format that Certificate Authorities issue certificates in. PEM certificates usually have extentions such as .pem, .crt, .cer, and .key. Linux (Apache) 将使用 PEM 格式的证书。PEM 格式是证书颁发机构颁发证书的最常见格式。PEM 证书通常具有扩展名,例如 .pem、.crt、.cer 和 .key。 They are Base64 encoded ASCII files and contain "-----BEGIN CERTIFICATE-----" and "-----END CERTIFICATE-----" statements.它们是 Base64 编码的 ASCII 文件,包含“-----BEGIN CERTIFICATE-----”和“-----END CERTIFICATE-----”语句。 Server certificates, intermediate certificates, and private keys can all be put into the PEM format.服务器证书、中间证书和私钥都可以放入 PEM 格式。

Apache and other similar servers use PEM format certificates. Apache 和其他类似的服务器使用 PEM 格式的证书。 Several PEM certificates, and even the private key, can be included in one file, one below the other, but most platforms, such as Apache, expect the certificates and private key to be in separate files.多个 PEM 证书,甚至私钥,可以包含在一个文件中,一个在另一个文件下,但大多数平台(例如 Apache)都希望证书和私钥位于不同的文件中。

I would not bother with the conversion prior to contacting your hosting provider as they can obtain the PKCS#12/PFX certificate from you and then covert it when installing it on the server.在联系您的托管服务提供商之前,我不会打扰转换,因为他们可以从您那里获取 PKCS#12/PFX 证书,然后在将其安装到服务器上时将其隐藏。 You should only have to provide the PKCS#12/PFX formatted certificate.您应该只需要提供 PKCS#12/PFX 格式的证书。

好吧,在您迁移到另一个托管平台后,可以轻松地重新颁发 SSL,而不是传输证书。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM