cPanel hosting panel installs SSL certificate to implement HTTPS website access

888u

Last update at :2024-06-15,Edit by888u

Snail has been playing around with SSL certificates recently, including the Namecheap paid SSL certificate purchased for less than $1 a year during Black Friday, and the Let\\'s Encrypt free SSL certificate recommended by many merchants and netizens. Certificates, for ordinary website users or blog users, it actually doesn’t make much sense as to which encryption level certificate to install. The most important thing is that the URL header has a small green lock, which makes it look high-end.

In view of Let's Encrypt's third-party support and the enthusiasm of many netizens, Snail used the SSL For Free tool the day before yesterday to generate a certificate package with one click. The method of installing it into a VPS server has also been shared before (at Here), in order to experience the methods of different environments, Snail also set up an environment in the virtual host environment of the cPanel panel used by many of our friends and installed the free SSL certificate generated the day before yesterday to the website.

The first step is to install the SSL certificate into the cPanel panel and prepare the work

Before we prepare to install the website to achieve HTTPS URL encryption certificate access, we need to add the website to the cPanel panel to achieve HTTP access. There is no need to teach this here, it is already a very basic thing. Secondly, we need to obtain the certificate package through the SSL For Free method above, and there are three files in it: ca_bundle.crt, certificate.crt, and private.key, which we need to prepare for later.

This is not just to play with Let\\'s Encrypt free certificate, Snail also specially registered the letsencrypt.cc domain name, and finally needs to realize the URL access form of https://www.letsencrypt.cc and all the forms are required. All jump to HTTPS addresses. Now that the preparations are done, let’s get started.

The second step is to log in to the cPanel panel to set up and add the prepared certificate file

1. Log in to SSL/TLS Manager

Log in to the CP panel, we can see the SSL/TLS manager as shown in the picture above.

There are many options above. Click here to manage SSL site options.

2. Add certificate file

Here we need to select the site that is already in the CP panel, that is, the configuration we prepared above and the domain name where the certificate was downloaded, and then copy the scripts of the certificate.crt file in it, and then you will see the corresponding Domain name options.

Then copy both the private.key and ca_bundle.crt files into the corresponding text boxes. Click Install Certificate so you can see the picture below.

Seeing this interface means that we have completed deploying the SSL certificate in the cpanel panel. After clicking OK, we can actually access our website using the HTTPS address.

The third step, force HTTPS to redirect to access the site

Firstly, it is to unify the user access entrance, and secondly, it is to standardize the URL. Therefore, the website that can be accessed using both HTTP and HTTPS must be unified into a unified format. Snail needs to jump all addresses accessed by HTTP to HTTPS addresses.

Because the Snail site uses the ZBLOG PHP program, add the 4 lines shown above directly to the .htaccess file in the root directory. Whether it is HTTP or without WWW, it will jump to the WWW form of HTTPS. .

RewriteCond %{SERVER_PORT} 80RewriteRule ^(.*)$ https://www.letsencrypt.cc/$1 [R,L]RewriteCond %{HTTP_HOST} ^letsencrypt.cc [NC]RewriteRule ^(.*)$ http://www.letsencrypt.cc/$1 [L,R=301]

Let’s try opening the website with a browser to see if there is a little green lock.

Fourth, use SSL tool to detect effectiveness and summary

Online detection tool: https://www.ssllabs.com/

No matter what kind of certificate we use to configure SSL, we can use the above online tool to check whether it is successful.

After the detection, it looks pretty good. So far, Snail has used the free Let\\'s Encrypt SSL certificate to generate and install it into the site. The process is relatively simple. If we also use the CP panel virtual host to build the site, we need to install SSL. For certificates, you can refer to the above method.

Recommended site searches: virtual space, Ministry of Industry and Information Technology registration query, domain name and host, Wanwang space management, https proxy ip, Taiwan server, com domain name registration, European server, Dalian virtual host, ws domain name,

cPanel hosting panel installs SSL certificate to implement HTTPS website access

All copyrights belong to 888u unless special state
取消
微信二维码
微信二维码
支付宝二维码