Linux cpanel host panel install SSL certificate to achieve HTTPS Web site Access Example

Source: Internet
Author: User
Tags cc domain cpanel free ssl free ssl certificate ssl certificate vps server letsencrypt
SSL Certificate

The SSL certificate is designed and developed by the Netscape Communication Company by establishing an SSL secure channel between the client browser and the Web server (Secure Socket Layer (SSL) security protocol. This security protocol is primarily used to provide authentication to users and servers, to encrypt and hide transmitted data, to ensure that data is not changed in transit, that is, the integrity of data, has become a global standard in this field. Because SSL technology has been established in all major browsers and Web server programs, it is only necessary to install a server certificate to activate the SSL protocol, which enables the encryption of data information between the client and the server to prevent the disclosure of data information. The security of the information is guaranteed, and the user can verify through the server certificate whether the website he visited is true and reliable. The digital signature, also known as the Digital certificate,digital ID, provides an online authentication method that is used to mark and prove the identity of both sides of the network communication digital information files, concepts similar to the daily life of driver's license or identity card similar. Digital signature is mainly used to send secure e-mail, access security site, online bidding and bidding, online contract, online ordering, secure online document transmission, online office, online payment, online tax and online shopping and other safe online electronic transactions.

The last time the old left in playing SSL certificate, which played in the black Friday period of less than 1 dollars a year to buy Namecheap paid SSL certificate, also played by many businesses and netizens recommended let's encrypt free SSL certificate, for the general site users or blog users, It doesn't make much sense to install a certificate of what level of encryption, and the main thing is that the URL head is a small green lock that feels high in the atmosphere.

In view of Let's encrypt third party support, as well as the enthusiasm of many netizens, the old left the day before yesterday there is a key to the use of SSL for the free tool to generate a certificate package, for the installation of the VPS server before the method has also been shared (here), in order to experience different ways Old left also alone in many of our friends use the Cpanel panel of the virtual host environment set up an environment and installed the day before yesterday to build a free SSL certificate to the site.

First step, install SSL certificate to cpanel panel preparation work

We are ready to install the site to achieve HTTPS URL encryption certificate access needs to add the site to the Cpanel panel, the implementation of HTTP can be accessed, this will not be taught here, already very basic things. Second, we need the above SSL for free method to obtain the card bag, and there are CA_BUNDLE.CRT, CERTIFICATE.CRT, private.key three files, we have to be ready to use.

This is not to play to let's encrypt free certificate, old left also deliberately registered to letsencrypt.cc domain name, and finally to achieve https://www.letsencrypt.cc such a Web site access form and need all the form to the HTTPS address. Now that the preparations are done, let's start together.

Step two, login to cpanel panel settings Add a prepared certificate file

1, Login Ssl/tls Manager

Login to the CP panel, we can see the image above, find the Ssl/tls manager.

The above options are many, here directly click the Admin SSL site option.

2, add the certificate file

Here we need to select the site already in the CP panel, that is, the configuration we have prepared above and the domain name that is downloaded to the certificate, and then the script for the Certificate.crt file in it is copied in, and then we see the corresponding domain name option.

The Private.key and ca_bundle.crt files are then copied into the corresponding text boxes. Click the install certificate so that you can see the image below.

Seeing this interface means that we have finished deploying SSL certificates in the Cpanel panel. After clicking OK we can actually visit our website with https address.

Step three, force HTTPS jump access site

One is to unify the user access, and then normalize the Web site, so you must either use HTTP access, or use HTTPS to access the Web site for a unified format. The old left needs to jump to the HTTPS address for all addresses that are accessed with HTTP.

Because the old left this site is zblog PHP program, so directly in the root directory of the. htaccess file, add the 4 lines shown above, whether HTTP or not with WWW, will jump to the www form https.
The code is as follows Copy Code
Rewritecond%{server_port} 80
Rewriterule ^ (. *) $ https://www.letsencrypt.cc/$1 [r,l]
Rewritecond%{http_host} ^letsencrypt.cc [NC]
Rewriterule ^ (. *) $ http://www.letsencrypt.cc/$1 [l,r=301]
We use the browser to open the site to try to see if there is a small green lock.
Four, using SSL tool detection and summary
The code is as follows Copy Code
On-Line inspection tool: https://www.ssllabs.com/
No matter what certificate we use to configure SSL, we can use the online tools above to detect success.
After testing is not bad, so far left the use of free Let's Encrypt SSL certificate generation and installation to the site, the process is relatively simple, if we are also using the CP Panel Virtual host construction site needs to install SSL certificate, you can refer to the above methods.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.