https://github.com/kelunik/aerys-acme
Automagically issue certificates for encrypted hosts in Aerys.
https://github.com/kelunik/aerys-acme
Last synced: 3 months ago
JSON representation
Automagically issue certificates for encrypted hosts in Aerys.
- Host: GitHub
- URL: https://github.com/kelunik/aerys-acme
- Owner: kelunik
- Created: 2015-11-10T21:30:14.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-11-25T19:28:05.000Z (over 9 years ago)
- Last Synced: 2025-02-28T08:17:33.127Z (4 months ago)
- Language: PHP
- Size: 3.91 KB
- Stars: 12
- Watchers: 3
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# aerys-acme
ACME is a protocol to automate certificate issuance and renewal. [Aerys](https://github.com/amphp/aerys) provides a feature to encrypt hosts automatically using ACME.
## installation
```
composer require kelunik/aerys-acme:dev-master
```## usage
```php
expose("*", 443)
->name("example.com");// Currently we need a redirect, because the spec requires
// the initial HTTP challenge to use HTTP instead of HTTPS.
// If you don't want to redirect all traffic, just redirect
// everything starting with "/.well-known/acme-challenge/".
$http = (new Host)
->expose("*", 80)
->name("example.com")
->redirect("https://example.com");// this will issue a test certificate, see below
return (new AcmeHost($https, __DIR__ . "/ssl"))
->acceptAgreement(LETS_ENCRYPT_AGREEMENT)
->encrypt(LETS_ENCRYPT_STAGING, ["mailto:[email protected]"]);// if your domain is already whitelisted for Let's Encrypt's closed beta,
// use the right server to obtain a real certificate
// return (new AcmeHost($https, __DIR__ . "/ssl"))
// ->acceptAgreement(LETS_ENCRYPT_AGREEMENT)
// ->encrypt(LETS_ENCRYPT_BETA, ["mailto:[email protected]"]);
```