Get the App
SLTechnology News&Howtos  ›  Servers  › 

Steps for apache to install a ssl certificate

Shulou Source: shulou.com Published: 2022-06-02 21:26:25 09月22日 Update

This article will explain in detail the steps for apache to install ssl certificate, the content of the article is of high quality, so the editor will share it with you for reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.

Most websites are now more secure in https,https than http, and when browsers visit https sites, there is a small lock in front of the address bar. Here's how to https your website.

Paid SSL certificates are very expensive. As individual webmasters, we can choose free SSL certificates. Domain name service providers such as Tencent Cloud and Aliyun will provide free application channels.

Apply for a certificate and download the Apache version of the certificate in the Certificate console.

Friendly reminder: the certificate file with .crt extension uses Base64-encoded PEM format text file, which can be modified to .pem extension as needed.

Take the Apache standard configuration as an example, if the certificate file name is a_public.crt, the certificate chain file is a_chain.crt, and the private key file is a.key.

Operation steps

1. Create the cert directory under the Apache installation directory and copy all the downloaded files to the cert directory. If you created the CSR file when you applied for the certificate, put the corresponding private key file in the cert directory and name it a.key

two。 Open the httpd.conf file in the conf directory under the apache installation directory, find the following, and remove the "#".

# LoadModule ssl_module modules/mod_ssl.so (if you cannot find it, please confirm whether the openssl plug-in has been compiled) # Include conf/extra/httpd-ssl.conf (delete the comment symbol "#" of the configuration statement at the beginning of the line, save and exit)

Remove the front # of lines 138 and 505

3. Open the conf/extra/httpd-ssl.conf file under the apache installation directory (or conf.d/ssl.conf, depending on the operating system and installation method), and look for the following configuration statement in the configuration file:

# add the SSL protocol support protocol, remove the insecure protocol SSLProtocol all-SSLv2-SSLv3# to modify the cipher suite as follows: SSLCipherSuite HIGHV "RC4" RC4 "MD5"NullL"eNULL"Null"DH"EDH"EDH"exp"Medu MSSLHonorCipherOrder on# certificate public key configuration SSLCertificateFile cert/a_public.crt# certificate private key configuration SSLCertificateKeyFile cert/a.key# certificate chain configuration. If the attribute begins with the character" # ", delete the SSLCertificateKeyFile cert/a.key# certificate chain configuration.

4. Restart Apache.

On the apache installation of ssl certificate steps to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Tags: Certificate file directory configuration step content website security extension article more knowledge article sentence related good operating system free application public key friendship Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Shulou Information Xiaomi MariaDB Huawei