add-dns.php 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php declare(strict_types=1); ?>
  2. <p>
  3. <?= _('A Let\'s Encrypt certificate will be obtained for this domain.') ?>
  4. </p>
  5. <p>
  6. <?= sprintf(_('The AAAA, A and CAA records for the domain must resolve to the same values as %s. This can be done by creating a CNAME record pointing to this domain for a non-apex domain, or using a nonstandard "ALIAS", "synchronized" or "flattened CNAME" record for an apex domain. You may alternatively manually copy records values, but it\'ll require a manual update when these values change.'), '<code>' . CONF['ht']['cname'] . '</code>') ?>
  7. </p>
  8. <details>
  9. <summary><?= _('Required values (for manual copy)') ?></summary>
  10. <dl>
  11. <dt><code>AAAA</code></dt>
  12. <dd>
  13. <code><?= CONF['ht']['ipv6_address'] ?></code>
  14. </dd>
  15. <dt><code>A</code></dt>
  16. <dd>
  17. <code><?= CONF['ht']['ipv4_address'] ?></code>
  18. </dd>
  19. <dt><code>CAA</code> (<?= _('useful for testing accounts only') ?>)</dt>
  20. <?= (($_SESSION['type'] ?? '') === 'testing') ? '' : '<s>' ?>
  21. <dd>
  22. <code>0 issue "letsencrypt.org; validationmethods=http-01; accounturi=<?= CONF['ht']['caa_account_uris']['testing'] ?>"</code>
  23. </dd>
  24. <?= (($_SESSION['type'] ?? '') === 'testing') ? '' : '</s>' ?>
  25. <dt><code>CAA</code> (<?= _('useful for approved accounts only') ?>)</dt>
  26. <?= (($_SESSION['type'] ?? '') === 'approved') ? '' : '<s>' ?>
  27. <dd>
  28. <code>0 issue "letsencrypt.org; validationmethods=http-01; accounturi=<?= CONF['ht']['caa_account_uris']['approved'] ?>"</code>
  29. </dd>
  30. <?= (($_SESSION['type'] ?? '') === 'approved') ? '' : '</s>' ?>
  31. </dl>
  32. </details>
  33. <p>
  34. <?= sprintf(_('Also, to prove that you own this domain, its subdomain %1$s must have a TXT record equal to %2$s when the form is being processed.'), '<code>_auth</code>', '<code>' . SERVER_NAME . '_domain-verification=' . getAuthToken() . '</code>') ?>
  35. </p>
  36. <form method="post">
  37. <label for="domain"><?= _('Domain') ?></label><br>
  38. <input required="" placeholder="site.<?= PLACEHOLDER_DOMAIN ?>" id="domain" name="domain" type="text"><br>
  39. <label for="dir"><?= _('Target directory') ?></label><br>
  40. <select required="" name="dir" id="dir">
  41. <option value="" disabled="" selected="">—</option>
  42. <?php
  43. foreach (dirsStatuses('dns') as $dir => $alreadyEnabled)
  44. echo ' <option' . ($alreadyEnabled ? ' disabled=""' : '') . ' value="' . $dir . '">' . $dir . '</option>' . LF;
  45. ?>
  46. </select>
  47. <br>
  48. <input type="submit" value="<?= _('Setup access') ?>">
  49. </form>