Install the https Certificate in linux apache and apachehttps

Source: Internet
Author: User

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.

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.