Deprecated: Typecho\Widget\Request::getServer(): Implicitly marking parameter $default as nullable is deprecated, the explicit nullable type must be used instead in D:\PHP_HOME\www\gp_blog\var\Typecho\Widget\Request.php on line 219

Deprecated: Typecho\Request::getServer(): Implicitly marking parameter $default as nullable is deprecated, the explicit nullable type must be used instead in D:\PHP_HOME\www\gp_blog\var\Typecho\Request.php on line 349

Deprecated: Typecho\Widget\Response::goBack(): Implicitly marking parameter $suffix as nullable is deprecated, the explicit nullable type must be used instead in D:\PHP_HOME\www\gp_blog\var\Typecho\Widget\Response.php on line 158

Deprecated: Typecho\Widget\Response::goBack(): Implicitly marking parameter $default as nullable is deprecated, the explicit nullable type must be used instead in D:\PHP_HOME\www\gp_blog\var\Typecho\Widget\Response.php on line 158
ubuntu 二级域名 ssl设定 - 开发者

1.为单域名申请SSL证书

# 安装 certbot 以及 certbot nginx 插件
sudo yum install certbot python2-certbot-nginx -y

# 执行配置,中途会询问你的邮箱,如实填写即可
sudo certbot --nginx

# 自动续约
sudo certbot renew --dry-run

2.为子域名申请Https
假如你已经已经使用Certbot生成了证书,并且想为别的域名申请证书。例如已经有一张域名为 www.example.com 的SSL证数,现在想申请一张域名为 blog.example.com 的SSL证书,可以使用下面的命令:

# 为其他域名申请证书
sudo certbot --expand -d www.example.com,blog.example.com

# 撤销已经申请的证数
sudo certbot revoke --cert-path /etc/letsencrypt/archive/example.com/cert1.pem

标签: none

评论已关闭