SSL deployment of realization https

More secure HTTPS requests,

And easily indexed by search engines.

Now many servers have free certificates such as Tencent cloud, seven cattle cloud, Ali cloud.

This part to Ali cloud, for example.

 

First, apply for SSL certificate

1. Log Ali cloud server;

2, Products and Services -> SSL Certificates -> Buy certificate;

3, free choice of DV SSL;

 

4, Li namely the purchase and support payment;

5, to return to products and services -> SSL certificate, you can see the certificate purchase, the state is to be done;

6. Click completion, fill in the domain of information and personal information (secondary domain name to apply for separately), recording automatically add a TXT record will be resolved in the domain name;

7, waiting for the audit, you can download.

 

Second, deploy SSL certificate (Apache)

1, the four downloaded file upload server and placed in the same directory;

2, modifying the domain configuration (port to 443, and the ssl-related information);

<VirtualHost *:443>
    DocumentRoot /var/www/test/
    ServerName test.com
    <Directory "/var/www/test/">
        Options FollowSymLinks
        AllowOverride all
        Order allow,deny
        Allow from all
    </Directory>
        SSLEngine on
        SSLProtocol TLSv1 TLSv1.1 TLSv1.2 SSLv3
        SSLCipherSuite ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4
        SSLCertificateFile cert/public.pem
        SSLCertificateKeyFile cert/214082306780502.key
        SSLCertificateChainFile cert/chain.pem
    ErrorLog "/mnt/test_error.log"
    CustomLog "/mnt/test_runtime.log" common
</VirtualHost>

3、开启阿里云服务器的 443 端口;

  云服务器 ECS -> 实例 -> 更多操作 -> 网络和安全组 -> 安全组配置 -> 配置规则,如果没有 443,则添加安全组规则。

4、ssl 部署后不会立刻生效,耐心等待后测试。

 

Guess you like

Origin www.cnblogs.com/rendd/p/11612882.html