因爲最近開發微信小程序,先後端交互須要使用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