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