You are here

function letsencrypt_provision_apache_vhost_config in Aegir HTTPS 7.3

Implements hook_provision_apache_vhost_config().

See also

https://github.com/lukas2511/dehydrated/blob/master/docs/wellknown.md

File

submodules/letsencrypt/drush/letsencrypt.drush.inc, line 89
A Let's Encrypt implementation of the Certificate service for Provision.

Code

function letsencrypt_provision_apache_vhost_config($uri, $data) {
  if (d()->type != 'site') {
    return '';
  }
  $server = d()->platform->web_server;
  if ($server->Certificate_service_type == 'LetsEncrypt' && ($challenge_path = $server->letsencrypt_challenge_path)) {
    drush_log(dt("Injecting Let's Encrypt 'well-known' ACME challenge directory ':path' into Apache vhost entry.", array(
      ':path' => $challenge_path,
    )));
    return letsencrypt_generate_apache_wellknown_lines($challenge_path);
  }
}