Focus on cloud service provider activities
Notes on website operation and maintenance

LAMP (Apache) environment deployment, installation of SSL security certificate and HTTPS encryption of website

With the need for website security and seemingly normalization, especially some user interactive websites have begun to add SSL security certificates, whether we use Free Wotong digital certificate SSL , or paid for commercial SSL. Our deployment methods are basically similar. In the previous article, Lao Zuo“ LNMP One Key Package Environment Installing SSL Security Certificates and Deploying HTTPS Website URL Process "In this article, we will simply share the deployment of SSL certificates in the NGINX architecture environment. In this article, we will continue to try to learn how to deploy SSL certificates in the LAMP (Apache) website environment, so that our website can also support HTTPS encryption.

First, Apache's preparations for deploying SSL certificates

Because Lao Zuo used LAMP in the test learning of this article( )The Apache website environment deployed by the one click environment package. If we use other one click packages or manual sources to install the deployment environment, we need to pay attention to the path of some files. Some are different. What are the specific differences? If Lao Zuo has time, he will test the commonly used LAMP one click package and source deployment methods one by one.

A - Try to add a site first

B - The certificate I use is the free Wotong digital certificate SSL. In the previous article, we mentioned that three files were extracted from the corresponding For Apache. zip package.

 Basic work preparation for HTTPS deployment

The three unzipped files we will use later. You can upload them to the VPS environment directory first. For example, if I put them in the ROOT directory first, the suffixes of the three files should not be changed. We can change the prefixes according to our needs.

C - Ensure that the environment has deployed the SSL module

yum install openssl
yum install mod_ssl

After the deployment, we need to implement the next important step.

Second, check and start the SSL module

In our environment, it is the ssl.conf file in the/etc/httpd/conf.d/directory, which Lao Zuo opened with the Submlme editor.

Check the LoadModule ssl_module modules/ line, and then if you see a # in front of it, start it. If it has been removed, leave it alone.

Third, edit and deploy SSL

Similarly, in the ssl.conf file, edit the lines below the<VirtualHost _default_: 443>location

DocumentRoot "/var/www/"
SSLEngine on
SSLCertificateFile /root/
SSLCertificateKeyFile /root/
SSLCertificateChainFile /root/laozuo_root_bundle.crt

The main thing is that the above lines are modified into the new site path we started to prepare and the three certificate files we uploaded to the ROOT directory. After modification, it will be uploaded to the corresponding location for replacement.

Fourth, restart to take effect

service httpd restart

Finally, we use https://domain name to check whether the certificate is displayed in the address bar.

 LAMP (Apache) environment deployment, installation of SSL security certificate and HTTPS encryption of website

Basically, it can achieve the certificate display we need. For specific practical applications, we will explore slowly.

To sum up, Lao Zuo basically tried to deploy HTTPS encrypted SSL using the LAMP (Apache) environment.

Domain name host preferential information push QQ group: six hundred and twenty-seven million seven hundred and seventy-five thousand four hundred and seventy-seven Get preferential promotion from merchants.
Like( zero )
Do not reprint without permission: Lao Zuo's Notes » LAMP (Apache) environment deployment, installation of SSL security certificate and HTTPS encryption of website

Scan the code to follow the official account

Get more news about webmaster circle!
Entrepreneurship, operation and new knowledge