微信小程序与业务服务器SSL握手失败

错误描述:
wx.request请求数据,电脑端开发工具运行正常,手机端预览时,获取不到所请求的数据.手机端调式控制台提示:ssl 握手失败;

解决方法:
修改ssl.conf, SSLCertificateFile, SSLCertificateKeyFile,SSLCertificateChainFile三者缺一不可,SSL证书可在startssl免费申请;修改完后,重启apache;

DocumentRoot “/var/www/html/”
ServerName www.xxx.com:443
SSLEngine on
SSLCertificateFile /root/www.xxx.com.crt
SSLCertificateKeyFile /root/www.xxx.com.key
SSLCertificateChainFile /root/xxx_root_bundle.crt
验证方法:可通过微信内置的浏览器打开所请求的URL,如果可以看到所请求的数据,则证明服务器端SSl配置成功.

猜你喜欢

转载自blog.csdn.net/xfcy1990/article/details/88875141