gitlab 页面:用于 certbot 挑战的特殊 webroot

gitlab pages : special webroot for certbot challenges

我正在尝试使用 objective 调整 GitLab Pages (10.8.2) 以使用 Let's Encrypt 启用其 Pages 域 (example.io) TLS。

我在常规 HTTP 上设置了一个可用的页面:

pages_external_url "http://example.io"

我在 Google 上找到的想法是提供以下内容来应对 certbot 挑战:

pages_nginx['custom_gitlab_server_config'] = "location ^~ /.well-known { root /var/www/letsencrypt; }"

然后发出gitlab-ctl reconfigure

然后我在 /var/www/letsencrypt/bla 创建一个测试文件并尝试在 http://example.io/.well-known/bla with no success : I get a 301 and redirected to the main GitLab domain at https://example.ltd/.well-known/bla 使用浏览器访问它(主要的 GitLab 已经启用了 TLS)。

我在这里错过了什么?

首先,as stated about ACME

wildcard domains must be validated using the DNS-01 challenge type

因此尝试为 *.example.io 挑战设置 webroot 是没有用的。

其次,使用上面的 Nginx 设置,文件应该位于 /var/www/letsencrypt/.well-known/bla