Quantcast
Channel: https – Gea-Suan Lin's BLOG
Viewing all articles
Browse latest Browse all 267

nginx 也要原生支援 ACME HTTP-01 了

$
0
0

之前 nginx 要使用 ACME 協定拿到 TLS certificate (像是 Let's Encrypt) 需要透過另外的程式處理,像是 Certbot (官方推薦的) 或是 Dehydrated (我自己愛用的),這次 nginx 則是宣佈可以在 web server 透過 HTTP-01 申請 TLS certificate 了:「NGINX Introduces Native Support for ACME Protocol」。

在這之前,在 web server 上面可以直接走 HTTP-01 申請的應該就是 Caddy,不過早期 binary 是非開源的 (但 source 本身還是用 Apache License 2.0 放出來),但後來到 2019 年的時候全部改 Apache License 2.0 了:「Caddy Server 要採用 Open Source...」,在這之後有看到不少人開始嘗試用 Caddy... 但我應該是今年才跳進去的?

回到 nginx 的設定部分,可以看到目前官方的範例是這樣,還是露出了實作上的細節 (cache 的設定),另外有點怪,server_name 部分不確定是什麼:

server { 

    listen 443 ssl;

    server_name  .example.com;

    acme_certificate letsencrypt;

    ssl_certificate       $acme_certificate;
    ssl_certificate_key   $acme_certificate_key;
    ssl_certificate_cache max=2;
}

整體算是往好的方向走,再過個幾版對這些設定調整一下,加上也有計畫要支援 DNS-01 的認證方式,到時候 wildcard domain 也可以掛上去,應該會更好用。


Viewing all articles
Browse latest Browse all 267

Latest Images

Trending Articles