Docker 使用 nginx-proxy + letsencrypt 实现自动签发 SSL 证书
1. 创建一个自定义网络 nginx-net
1 | $ docker network create nginx-net |
Hi, nice to meet you!
nginx-net
1 | $ docker network create nginx-net |
因为 Certbot
的很多依赖并不在系统默认 Repo 中,需要先安装 EPEL Repo
,运行 yum install epel-release
,同时为了防止组件过旧导致的报错,建议运行一次 yum update
Certbot
因为目前没有 CentOS 的预编译安装包,所以通过 certbot-auto
脚本来获得 Certbot
.
由于本例中服务器需要使用 php 服务,所以之前安装了 WDCP
面板(自带LNAMP),所以此处不提如何安装Nginx
1 | server { |
记录日志到 storage\logs\laravel.log
1 | $writer = app('log'); |