2017 © Pedro Peláez
 

symfony-bundle letsencrypt-bundle

Free SSL/HTTPS for your Symfony application with automatic renewal and certificates monitoring

image

cert/letsencrypt-bundle

Free SSL/HTTPS for your Symfony application with automatic renewal and certificates monitoring

  • Friday, November 11, 2016
  • by nodesha
  • Repository
  • 2 Watchers
  • 1 Stars
  • 107 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 20 % Grown

The README.md

CertLetsEncryptBundle

This bundle is currently in development., (*1)

CertLetsEncryptBundle provides a simple yet fully configurable Symfony command to renew automatically the HTTPS certificates of your website. It has never been so easy to use HTTPS in your Symfony application!, (*2)

CertLetsEncryptBundle is also able to warn you (by mail for instance) when the renewal of a certificate failed., (*3)

Installation

Using Composer:, (*4)

composer require cert/letsencrypt-bundle:1.0.x-dev

Enable the bundle in your AppKernel:, (*5)

``` php <?php, (*6)

class AppKernel extends Kernel { public function registerBundles() { $bundles = [ // ..., (*7)

        new Cert\LetsEncryptBundle\CertLetsEncryptBundle(),

        // ...
    ];

    // ...
}

// ...

}, (*8)


Usage ----- Simply configure the bundle to your needs: ``` yaml # app/config/config.yml cert_lets_encrypt: # Path to the Let's Encrypt executable (usually your letsencrypt-auto binary) letsencrypt: ~ # Required # Recovery email used by Let's Encrypt for registration and recovery contact recovery_email: ~ # Required # Logs directory (if not specified, the application logs directory will be used) logs_directory: null # Domains to get certificates for (this application should response to these domains) domains: [] # Required # Monitorings to be warned if an error occured during the renewal of one of your certificates monitoring: # Email monitoring email: enabled: false # If an error occured, emails where a warning should be sent to: []

For a classical setup, you can clone the Let's Encrypt repository in your bin directory (cd /path/to/your/project/bin && git clone https://github.com/letsencrypt/letsencrypt) and use it as script. You probably also want to be warned by email if an error occurs., (*9)

``` yaml, (*10)

app/config/config.yml

cert_lets_encrypt: letsencrypt: "%kernel.root_dir%/../bin/letsencrypt/letsencrypt-auto" recovery_email: "youremail@example.org" domains: - example1.org - www.example1.org - example2.org - www.example2.org monitoring: email: enabled: true to: [ "youremail@example.org" ], (*11)


You can test your parameters work properly by running:

$ sudo -H php app/console cert:letsencrypt, (*12)

Or for Symfony 3

$ sudo -H php bin/console cert:letsencrypt, (*13)


> You need to run this script as root as Let's Encrypt need root privileges. And you can check you are properly warned if an error occurs by running:

$ sudo -H php app/console cert:letsencrypt --emulate-failure, (*14)

Or for Symfony 3

$ sudo -H php bin/console cert:letsencrypt --emulate-failure, (*15)


If everything work as expected, you can configure a CRON task to run this command every 2 days for instance:

$ sudo su $ crontab -e, (*16)

0 0 */2 * * sudo -H php /path/to/your/project/app/console cert:letsencrypt, (*17)

Or for Symfony 3

0 0 */2 * * sudo -H php /path/to/your/project/bin/console cert:letsencrypt ```, (*18)

The Versions

11/11 2016

dev-master

9999999-dev https://github.com/nodesha88/LetsEncryptBundle

Free SSL/HTTPS for your Symfony application with automatic renewal and certificates monitoring

  Sources   Download

MIT

The Requires

 

The Development Requires

https symfony ssl letsencrypt free monitoring automatic certificates renewal