往常很多网站,特别是小程序都恳求https的访问,假设你不想花几百元买一个https的证书的话,那么下面的方法你一定要记得收藏。
curl https://get.acme.sh | sh
acme.sh --issue -d example.com -w /home/wwwroot/example.com
nginx和apache安装证书
apache安装证书
acme.sh --install-cert -d example.com \
--cert-file /path/to/certfile/in/apache/cert.pem \
--key-file /path/to/keyfile/in/apache/key.pem \
--fullchain-file /path/to/fullchain/certfile/apache/fullchain.pem \
--reloadcmd "service apache2 force-reload"
nginx安装证书
acme.sh --install-cert -d example.com \
--key-file /path/to/keyfile/in/nginx/key.pem \
--fullchain-file /path/to/fullchain/nginx/cert.pem \
--reloadcmd "service nginx force-reload"
acme.sh --renew -d example.com --force
就是这么简单,就是这么便当,假设有其它的问题或者参数可以在github上面搜索acme.sh