PHP configuration default SSL CA certificate

Source: Internet
Author: User
Tags ssl certificate

1, download the CA certificate from Curl official website (of course, you can also choose to create an SSL CA certificate, refer to 54898870 for details, or Baidu for yourself)

CA Certificate: https://curl.haxx.se/docs/caextract.html page to select download

Or: Https://curl.haxx.se/ca/cacert.pem

2. Create a new folder in the PHP installation directory CACert to store the CA certificate

Modifying the php.ini configuration

Enable OpenSSL, Curl extension

Search for extension, remove the semicolon comment that needs to be opened before expanding

Extension=curl

Extension=openssl

Search [curl] and [OpenSSL] to find the curl and OPPENSSL configuration modules

; Configure CA Certificate Storage location

curl.cainfo= H:/phpapache/php-7.2.7-ts-x64/cacert/cacert.pem
Openssl.cafile=h:/phpapache/php-7.2.7-ts-x64/cacert/cacert.pem

; Configuring the CA Certificate Directory
Openssl.capath=h:/phpapache/php-7.2.7-ts-x64/cacert

3. Apache Configuration SSL Certificate

Reference: https://jingyan.baidu.com/article/22fe7cedda56213002617f0d.html

Request an SSL certificate first

Open the OpenSSL module

LoadModule ssl_module modules/mod_ssl.so get rid of the full # number

DV SSL is not recommended for e-commerce sites or Web sites with high security requirements (domain Validation SSL is an SSL certificate that only validates the ownership of the domains)

PHP configuration default SSL CA certificate

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.