文章目录
申请一个谷歌账号
申请账号略
1.进入gcloud的shell 界面
$ gcloud config set project usfesfeef
$ gcloud beta publicca external-account-keys create
Created an external account key
[b64MacKey: 8_QhVdsfefesfesfesf6fnw770bCyfp7vz5FeCUkOozLr5DrJgwPwQsiXkWMnawCBm1ZF-8n2D3wg8Ny1Q-xmv8IbdA
keyId: 9d5fda6b69c5exsdfdsefse91fee6db3d3]
2.创建好了key之后,去linux服务器中下载 acme
yum install openssl
yum install openssl-devel
curl https://get.acme.sh | sh -s email=kei3aeuhnh@gmail.com
acme.sh --register-account -m beaggguikihlgil@gmail.com --server google --eab-kid “9d5fdagkukguk6daeb676d0c262599” --eab-hmac-key “fqmkDqfJ3hngkukughkghukvbA2wa6P64vJaIl1W6O703sUCaWEUvHLUKDd30Q3wwxfjuykufkuy”
3.认证好之后
acme.sh --issue --server google -d zabbix.opcc.com -f --webroot /home/www/html/
其中nginx的配置可以为
server {
listen 80;
server_name zabbix.opcc.com;
location / {
return 301 https:// h o s t host hostrequest_uri;
}
location /.well-known/acme-challenge/ {
root /home/www/html;
allow all;
}
}