让加密403 - 客户端缺乏足够的授权.Drupal 7网站

Lee*_*man 1 apache .htaccess drupal amazon-ec2 lets-encrypt

在尝试生成LetsEncript证书时,我得到以下403.

[ec2-user @ myip html] $/opt/letsencrypt/letsencrypt-auto certonly --webroot -w/var/www/html -d example.com -d www.example.com --config/etc/letsencrypt/config的.ini --agree-TOS检查新版本...请求root权限才能运行letsencrypt ...须藤/home/ec2-user/.local/share/letsencrypt/bin/letsencrypt certonly --webroot -w在/ var/www/html/myroot -d example.com -d www.example.com --config /etc/letsencrypt/config.ini --agree-tos版本:1.1-20080819版本:1.1-20080819授权程序失败.mydomain.com(HTTP-01):瓮:ACME:错误:未经授权的::客户端缺乏足够的授权::从无效响应 http://example.com/.well-known/acme-challenge/IDug1d_rT8rZNPQQfdsgfdgsdfBKRJaHMTa3kulh4HnQ [52.30.98.10 ]:403

重要说明: - 服务器报告了以下错误:

域:mydomain.com类型:未经授权的详情:从响应无效http://example.com/.well-known/acme-
挑战/ IDug1d_rT8rZNPQQkjsdgfdgdfggdfajhsTa3kulh4HnQ
403:[52.30.98.101]

要修复这些错误,请确保您的域名
输入正确,并且该域的DNS A记录
包含正确的IP地址.

小智 5

如何在Drupal上配置Let的加密

要使您的Drupal站点与Let's Encrypt一起使用,以下是htaccess文件中的更改要求.

这一行:

<FilesMatch "\.(engine|inc|install|make|module|profile|po|sh|.*sql|theme|twig|tpl(\.php)?|xtmpl|yml)(~|\.sw[op]|\.bak|\.orig|\.save)?$|^(\..*|Entries.*|Repository|Root|Tag|Template|composer\.(json|lock))$|^#.*#$|\.php(~|\.sw[op]|\.bak|\.orig|\.save)$">
Run Code Online (Sandbox Code Playgroud)

被这条线交换:

<FilesMatch "\.(engine|inc|install|make|module|profile|po|sh|.*sql|theme|twig|tpl(\.php)?|xtmpl|yml)(~|\.sw[op]|\.bak|\.orig|\.save)?$|^(\.(?!well-known).*|Entries.*|Repository|Root|Tag|Template|composer\.(json|lock))$|^#.*#$|\.php(~|\.sw[op]|\.bak|\.orig|\.save)$">
Run Code Online (Sandbox Code Playgroud)

而且,这一行:

RewriteRule "(^|/)\." - [F]
Run Code Online (Sandbox Code Playgroud)

被这条线交换:

RewriteRule "(^|/)\.(?!well-known)" - [F]
Run Code Online (Sandbox Code Playgroud)

资料来源:https: //support.cloudways.com/configure-drupal-lets-encrypt/