因为最近开发微信小程序,先后端交互须要使用https协议,故须要配置https服务linux
wget https://dl.eff.org/certbot-auto --no-check-certificate chmod +x ./certbot-auto ./certbot-auto -n
./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
web
开启xampp的ssl功能:xampp enablessl
ubuntu