在 apache 里设置 acme 验证证书的目录

如这里提到的:https://doc.owncloud.com/server/next/admin_manual/installation/letsencrypt/apache.html

我拿来套用的例子:

<VirtualHost *:443>
    ServerName demo.anqun.org

  Alias /.well-known/acme-challenge/ /var/www/acme/.well-known/acme-challenge/
  <Directory "/var/www/acme/.well-known/acme-challenge/">
      Options None
      AllowOverride None
      ForceType text/plain
      RedirectMatch 404 "^(?!/\.well-known/acme-challenge/[\w-]{43}$)"
  </Directory>

 SSLEngine on
 SSLCertificateFile  /root/.acme.sh/demo.anqun.org_ecc/demo.anqun.org.cer
 SSLCertificateKeyFile /root/.acme.sh/demo.anqun.org_ecc/demo.anqun.org.key
 SSLCertificateChainFile  /root/.acme.sh/demo.anqun.org_ecc/ca.cer

</VirtualHost>

<VirtualHost *:80>
  ServerName demo.anqun.org
  Redirect permanent / https://demo.anqun.org/
  Alias /.well-known/acme-challenge/ /var/www/acme/.well-known/acme-challenge/
  <Directory "/var/www/acme/.well-known/acme-challenge/">
      Options None
      AllowOverride None
      ForceType text/plain
      RedirectMatch 404 "^(?!/\.well-known/acme-challenge/[\w-]{43}$)"
  </Directory>
</VirtualHost>

标签: apache, acme

添加新评论