Install the https Certificate in linux apache and apachehttps
1. First check whether apache is installed
Command: rpm-qa | grep httpd
If yes, uninstall the command: rpm-e XXXX
If not, run the following command: yum install httpd.
After installing apache, you also need to install the ssl module. Command: yum install mod_ssl
2. Configure ssl. conf
Open/etc/httpd/conf. d/ssl. conf
Find the following
SSLCertificateFile/etc/pki/tls/certs/localhost. crt
SSLCertificateKeyFile/etc/pki/tls/private/localhost. key
# SSLCACertificateFile/etc/pki/tls/certs/ca-bundle.crt
Modify it to the corresponding file in the https certificate you applied for, and remove the # Before the third line.
Find the following information in the ssl. conf file:
# DocumentRoot "/var/www/html"
# ServerName www.example.com: 443
Change the root directory and domain name of the document to your actual domain name.
After the preceding information is modified and saved, restart the httpd service. Command: service httpd restart
Then, enter https: // domain name in the browser to check whether the access is normal.
If the access fails, check whether port 443 is accessible.
Note: Some ECs ports must be self-activated.