LAMP (Apache) environment deployment and installation of SSL security certificates and HTTPS encrypted websites

888u

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

With the need for website security and formalization, especially some user-interactive websites have begun to add SSL security certificates. Whether we use free WoSign digital certificate SSL or paid commercial SSL, we The deployment methods are basically similar. In the previous article, Snail briefly shared the NGINX architecture environment SSL certificate in the article "Installing SSL security certificates in LNMP one-click package environment and deploying HTTPS website URL process" deploy. In this article, continue to try to learn to deploy LAMP (Apache) website environment to deploy SSL certificates, so that our website also supports HTTPS encryption.

First, preparations for Apache to deploy SSL certificate

Because in the test study of this article, Snail is an Apache website environment deployed using the LAMP (yumlamp.com) one-click environment package. If we use other one-click packages or manual sources to install and deploy the environment, we need Pay attention to the paths of some files, some are still different. What are the specific differences? If Snail has time later, he will test the commonly used LAMP one-click packages and source deployment methods on the market one by one.

A – Try adding a site first

B – I used the free WoSign digital certificate SSL for the certificate. In the previous article, we have mentioned three files extracted from the corresponding For Apache.zip package.

The three extracted files will be used later. You can upload it to the VPS environment directory first. For example, I put it in the ROOT directory first. Do not change the suffixes of the three files. We can modify the prefix names according to our own needs.

C – Make sure the environment has the SSL module deployed

yum install opensslyum install mod_ssl

In this way, after we complete the deployment, we will perform the important next steps.

Second, check and start the SSL module

In our environment, it is the ssl.conf file in the /etc/httpd/conf.d/ directory. Snail opens it with the Submlime editor.

Check the LoadModule ssl_module modules/mod_ssl.so line, and then if you see # in front, remove it and start it. If it has been removed, ignore it.

Third, edit and deploy SSL

Similarly in the ssl.conf file, edit the lines below the location

DocumentRoot \\”/var/www/laozuo.org/public_html/\\”ServerName laozuo.org:443SSLEngine onSSLCertificateFile /root/laozuo.org.crtSSLCertificateKeyFile /root/laozuo.org.keySSLCertificateChainFile /root/laozuo_root_bundle.crt

The main thing is the above lines, modified to prepare the new site path and the three certificate files we uploaded to the ROOT directory. After modification, upload it to the corresponding location and replace it.

Fourth, restart to take effect

service httpd restart

Finally, we use the https:// domain name to see if there is a certificate displayed in the address bar.

Basically, we can achieve the certificate display we need. We will explore the specific practical applications later.

To summarize, through this article Snail basically tried to use LAMP (Apache) environment to deploy URL HTTPS encrypted SSL deployment.

Recommended site searches: domain name registration query, registration number query, registration query Ministry of Industry and Information Technology, independent ip host, Japanese server rental Japanese server, free virtual host, ip168, icp registration, asp free space, multi-ip station group server,

p>

LAMP (Apache) environment deployment and installation of SSL security certificates and HTTPS encrypted websites

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