21 lines
670 B
Plaintext
21 lines
670 B
Plaintext
# TG Vault 首次申请证书用 HTTP 站点;替换两个域名。
|
|
# ACME webroot 为 /var/www/certbot,须由管理员提前创建。
|
|
# 不代理应用,不允许通过 HTTP 初始化管理员或传输凭证。
|
|
# 证书签发后用 nginx-site.conf 替换本站点,不要重复加载。
|
|
# 示例:certbot certonly --webroot -w /var/www/certbot -d cloud.example.com
|
|
# certbot certonly --webroot -w /var/www/certbot -d api.example.com
|
|
|
|
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
server_name cloud.example.com api.example.com;
|
|
|
|
location /.well-known/acme-challenge/ {
|
|
root /var/www/certbot;
|
|
}
|
|
|
|
location / {
|
|
return 503;
|
|
}
|
|
}
|