le-challenge-webroot.js/README.md

57 lignes
1.6 KiB
Markdown
Brut Lien permanent Vue normale Historique

2019-04-27 03:17:46 +00:00
# [le-challenge-webroot](https://git.rootprojects.org/root/acme-http-01-webroot.js)
| [letsencrypt](https://git.rootprojects.org/root/greenlock.js) (library)
| [letsencrypt-cli](https://git.rootprojects.org/root/greenlock-cli.js)
| [letsencrypt-express](https://git.rootprojects.org/root/greenlock-express.js)
| [letsencrypt-cluster](https://git.rootprojects.org/root/greenlock-cluster.js)
| [letsencrypt-koa](https://git.rootprojects.org/root/greenlock-koa.js)
| [letsencrypt-hapi](https://git.rootprojects.org/root/greenlock-hapi.js)
2016-08-09 17:05:36 +00:00
|
2019-04-27 03:17:46 +00:00
An fs-based strategy for Greenlock for setting, retrieving,
and clearing ACME (Let's Encrypt) challenges issued by the ACME server
2016-08-05 07:54:57 +00:00
This places the acme challenge in an appropriate directory in the specified `webrootPath`
and removes it once the challenge has either completed or failed.
* Safe to use with node cluster
* Safe to use with ephemeral services (Heroku, Joyent, etc)
Install
-------
```bash
npm install --save le-challenge-fs@2.x
```
Usage
-----
2016-10-14 15:51:56 +00:00
```js
2019-04-27 03:17:46 +00:00
var http01Challenge = require('le-challenge-fs').create({
webrootPath: '/srv/www/:hostname/.well-known/acme-challenge' // defaults to os.tmpdir() + '/' + 'acme-challenge'
2016-08-05 07:54:57 +00:00
, debug: false
});
2019-04-27 03:17:46 +00:00
var Greenlock = require('greenlock');
2016-08-05 07:54:57 +00:00
2019-04-27 03:17:46 +00:00
Greenlock.create({
...
, challenges: {
'http-01': http01Challenge
}
2016-08-05 07:54:57 +00:00
});
```
2016-08-09 17:05:36 +00:00
NOTE: If you request a certificate with 6 domains listed,
it will require 6 individual challenges.
2016-08-05 07:54:57 +00:00
Exposed Methods
---------------
For ACME Challenge:
2016-08-09 17:05:36 +00:00
* `set(opts, domain, key, val, done)`
* `get(defaults, domain, key, done)`
* `remove(defaults, domain, key, done)`