安装acme
1 | apt-get install socat |
申请证书
-
阿里云申请Letsencrypt证书
1
2
3export Ali_Key="sdfsdfsdfljlbjkljlkjsdfoiwje"
export Ali_Secret="jlsdflanljkljlfdsaklkjflsa"
acme.sh --issue --dns dns_ali -d example.com -d *.example.com -
Namesilo申请Letsencrypt证书
1
2
3
4export PROVIDER=namesilo
export LEXICON_NAMESILO_TOKEN="namesilo-api-token"
acme.sh --issue --dns dns_lexicon -d test.acme.sh --dnssleep 960
./acme.sh --issue --dns dns_lexicon -d example.com -d *.example.com --dnssleep 960 -
cloudflare
1
2
3
4PROVIDER=cloudflare
SAVED_CF_Key=
SAVED_CF_Email=
acme.sh --issue --dns dns_cf -d example.com -d *.example.com -
自动申请
添加周期任务
1
2
3crontab -e
添加已下配置
21 0 * * * "/root/.acme.sh"/acme.sh --cron --home "/root/.acme.sh" > /root/.acme.sh/run.log
CAA Record
域名解析添加 CAA 记录
1 | 0 issuewild "letsencrypt.org" |
问题
-
pyconfig.h: No such file or directory
1
2sudo apt-get install python-dev libxml2-dev libxslt-dev libssl-dev build-essential libffi-dev
sudo pip install cryptography enum34 -
测试HTTPS
openssl s_client -connect domain[:port]