From 730cf350c1a3ee1d0728a4e9d318d5833a71db29 Mon Sep 17 00:00:00 2001 From: neil Date: Mon, 6 Feb 2017 21:43:47 +0800 Subject: [PATCH] Updated Stateless Mode (markdown) --- Stateless-Mode.md | 48 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/Stateless-Mode.md b/Stateless-Mode.md index 30404ce..6abc753 100644 --- a/Stateless-Mode.md +++ b/Stateless-Mode.md @@ -1 +1,47 @@ -TODO \ No newline at end of file +## Stateless Mode + +Configure your webserver to respond statelessly to challenges for a given account key. This requires nothing more than a one-time web server configuration change and no "moving parts". + +1. First get your account key thumbprint: + +``` +root@ed:~# acme.sh --register-account +[Mon Feb 6 21:40:18 CST 2017] Registering account +[Mon Feb 6 21:40:19 CST 2017] Already registered +[Mon Feb 6 21:40:21 CST 2017] Update success. +[Mon Feb 6 21:40:21 CST 2017] ACCOUNT_THUMBPRINT='6fXAG9VyG0IahirPEU2ZerUtItW2DHzDzD9wZaEKpqd' +``` + +Remember the the thumbprint in the last line: +` +6fXAG9VyG0IahirPEU2ZerUtItW2DHzDzD9wZaEKpqd +` + +2. Configure the nginx server to return the account key thumbprint: + +``` +http { +... + server { + +... + + location ~ "^/\.well-known/acme-challenge/([-_a-zA-Z0-9]+)$" { + default_type text/plain; + return 200 "$1.6fXAG9VyG0IahirPEU2ZerUtItW2DHzDzD9wZaEKpqd"; + } + +... + + } +} + +``` + + +3. Ok, you can issue cert now. + +``` +acme.sh --issue -d example.com --stateless +``` +