Updated Stateless Mode (markdown)
parent
c17db263c0
commit
d69d7cebf0
|
@ -3,7 +3,6 @@
|
||||||
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".
|
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:
|
1. First get your account key thumbprint:
|
||||||
|
|
||||||
```
|
```
|
||||||
root@ed:~# acme.sh --register-account
|
root@ed:~# acme.sh --register-account
|
||||||
[Mon Feb 6 21:40:18 CST 2017] Registering account
|
[Mon Feb 6 21:40:18 CST 2017] Registering account
|
||||||
|
@ -15,9 +14,9 @@ Remember the thumbprint in the last line:
|
||||||
`
|
`
|
||||||
6fXAG9VyG0IahirPEU2ZerUtItW2DHzDzD9wZaEKpqd
|
6fXAG9VyG0IahirPEU2ZerUtItW2DHzDzD9wZaEKpqd
|
||||||
`
|
`
|
||||||
|
1. Configure the web server to return the account key thumbprint:
|
||||||
2. Configure the nginx server to return the account key thumbprint:
|
### NGINX
|
||||||
|
Add something similar to your `nginx.conf`:
|
||||||
```
|
```
|
||||||
http {
|
http {
|
||||||
...
|
...
|
||||||
|
@ -31,7 +30,38 @@ http {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
### APACHE
|
||||||
|
Add something similar to your `httpd.conf`:
|
||||||
|
```
|
||||||
|
LoadModule php7_module libexec/apache2/libphp7.so
|
||||||
|
...
|
||||||
|
<VirtualHost *:80>
|
||||||
|
...
|
||||||
|
<IfModule php7_module>
|
||||||
|
AddType application/x-httpd-php .php
|
||||||
|
AddType application/x-httpd-php-source .phps
|
||||||
|
<IfModule dir_module>
|
||||||
|
DirectoryIndex index.html index.php
|
||||||
|
</IfModule>
|
||||||
|
</IfModule>
|
||||||
|
...
|
||||||
|
<Directory "/PATH/TO/WWW/ROOT/.well-known/acme-challenge/">
|
||||||
|
RewriteEngine On
|
||||||
|
RewriteRule "^[-_a-zA-Z0-9]+$" "index.php"
|
||||||
|
</Directory>
|
||||||
|
...
|
||||||
|
</VirtualHost>
|
||||||
|
...
|
||||||
|
```
|
||||||
|
Then add `/PATH/TO/WWW/ROOT/.well-known/acme-challenge/index.php`:
|
||||||
|
```php
|
||||||
|
<?php
|
||||||
|
header("Content-Type: text/plain");
|
||||||
|
$token = array_pop(explode('/',$_SERVER['REQUEST_URI']));
|
||||||
|
echo "$token.6fXAG9VyG0IahirPEU2ZerUtItW2DHzDzD9wZaEKpqd";
|
||||||
|
?>
|
||||||
|
```
|
||||||
|
_NOTE that this approach uses PHP but something similar could be done with CGI, Perl, Ruby or pretty much any other server-side language._
|
||||||
3. Ok, you can issue cert now.
|
3. Ok, you can issue cert now.
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue