欢迎光临,了解微信小程序开发,就上易用通!

关于开发微信小程序后端linux使用xampp配置https

发布:2018-04-18 10:53浏览: 来源:网络 作者:cola

背景

 

由于最近开发微信小程序,前后端交互需要使用https协议,故需要配置https服务

服务器环境 
服务器系统 ubuntu 
环境 xampp 
SSL服务 let's encript

 

步骤

 

安装certbot-auto:

 

  1. wget https://dl.eff.org/certbot-auto --no-check-certificate
  2. chmod +x ./certbot-auto
  3. ./certbot-auto -n

申请证书:

 

  1. ./certbot-auto certonly --webroot --webroot-path /opt/lampp/htdocs -d xxxxx.com --agree-tos --email xxxxxx@qq.com

证书在/etc/letsencrypt/live/xxxxx.com目录下,  然后我们需要两个:fullchain.pem和privkey.pem,  将其移动到/opt/lampp/etc/ssl.crt和/opt/lampp/etc/ssl.key中,  并进行相应改名为 server.key和server.crt

开启xampp的ssl功能:xampp enablessl





免责声明:本站所有文章和图片均来自用户分享和网络收集,文章和图片版权归原作者及原出处所有,仅供学习与参考,请勿用于商业用途,如果损害了您的权利,请联系网站客服处理。