NAME

Toadfarm::Plugin::Letsencrypt - Toadfarm Plugin to handle letsencrypt.org domain verifications.

SYNOPSIS

  # Toadfarm
  plugin 'Letsencrypt' => {...};

DESCRIPTION

Toadfarm::Plugin::Letsencrypt is a Toadfarm plugin that will generate routes for providing responses for letsencrypt.org domain verification.

  Config options
  challenges -> /path/to/challenges/root (/tmp/letsencrypt/public_html)
  route -> /path/to/route/called/by/letsencrypt (/.well-known/acme-challenges)

In your Toadfarm script, make sure you mount your apps with a User-Agent rejection (you should reject Github-Hookshot as well so you can use Toadfarm::Plugin::Reload):

  mount '/var/mojo/myapp.pl' => {
    "User-Agent" => qr{^(?:(?!GitHub-Hookshot)(?!letsencrypt).)*$},
  };

Download letsencrypt.org Run it with ./letsencrypt-auto certonly -a manual -d cn1.domain.tld -d ... For each domain specified, letsenrypt will need to verify ownership and will provide details for capturing the challenge / response:

  mkdir -p /tmp/letsencrypt/public_html/.well-known/acme-challenge
  cd /tmp/letsencrypt/public_html
  printf "%s" 123 > .well-known/acme-challenge/abc

Simplist thing to do is copy and paste that. Toadfarm::Plugin::Letsencrypt will pick up the verification request from letsencrypt and provide the correct challenge response in order to verify domain ownership.

METHODS

Toadfarm::Plugin::Letsencrypt inherits all methods from Mojolicious::Plugin and implements the following new ones.

register

  $plugin->register(Mojolicious->new);

Register plugin in Mojolicious application.

SEE ALSO

Toadfarm, Mojolicious, Mojolicious::Guides, http://mojolicio.us.