这是一个轻量级的 Nginx 反向代理镜像,用于将自定义域名代理到 GitHub Pages。
| 标签 | 描述 | 代理目标 |
|---|---|---|
yiiewang.github.io | 博客代理 | https://yiiewang.github.io |
# 拉取镜像
docker pull cloaks/nginx:yiiewang.github.io
# 运行容器 (HTTP)
docker run -d --name nginx-proxy \
--restart unless-stopped \
-p 80:80 \
cloaks/nginx:yiiewang.github.io
# 运行容器 (带 SSL 证书)
docker run -d --name nginx-proxy \
--restart unless-stopped \
-p 80:80 \
-p 443:443 \
-v /etc/letsencrypt:/etc/letsencrypt:ro \
cloaks/nginx:yiiewang.github.io
/health)| 端口 | 协议 | 说明 |
|---|---|---|
| 80 | HTTP | Web 服务 |
| 443 | HTTPS | SSL 加密 (需挂载证书) |
如需启用 HTTPS,请先在服务器上安装 Let's Encrypt 证书:
# 安装 certbot
apt-get install certbot
# 申请证书
certbot certonly --standalone -d your-domain.com
# 证书路径
# /etc/letsencrypt/live/your-domain.com/fullchain.pem
# /etc/letsencrypt/live/your-domain.com/privkey.pem
curl http://localhost/health
# 返回: OK
nginx:alpinelinux/amd64GitHub: cloakscn/cloakscn.github.io
Content type
Image
Digest
sha256:937044830…
Size
21.6 MB
Last updated
8 months ago
docker pull cloaks/nginx:yiiewang.github.io