Apache 让我们加密403-客户端缺少足够的授权。Drupal7站点

Apache 让我们加密403-客户端缺少足够的授权。Drupal7站点,apache,.htaccess,drupal,amazon-ec2,lets-encrypt,Apache,.htaccess,Drupal,Amazon Ec2,Lets Encrypt,当尝试生成LetsScript证书时,我得到以下403 [ec2-user@myiphtml]$/opt/letsencrypt/letsencrypt仅限自动证书 -webroot-w/var/www/html-d example.com-d www.example.com-config/etc/letsencrypt/config.ini-agree-tos检查新版本。。。正在请求根权限以运行letsencrypt。。。苏多 /home/ec2 user/.local/share/letse

当尝试生成LetsScript证书时,我得到以下403

[ec2-user@myiphtml]$/opt/letsencrypt/letsencrypt仅限自动证书 -webroot-w/var/www/html-d example.com-d www.example.com-config/etc/letsencrypt/config.ini-agree-tos检查新版本。。。正在请求根权限以运行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:urn:acme:error:unauthorized::The 客户端缺少足够的授权::来自的响应无效 [52.30.98.10]:403

重要提示: -服务器报告了以下错误:

域:mydomain.com类型:未经授权的详细信息:无效 来自 挑战/IDug1d_RT8RZNPQKJSDGFDGDFGGDFAJHSTA3KULH4HNQ [52.30.98.101]:403

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


事实证明Drupal的.htaccess文件不允许访问隐藏的文件。我临时将.htaccess文件重命名为.temphtaccess,授权生效

/opt/letsencrypt/letsencrypt auto certonly-webroot-w/var/www/html/myroot-d example.com-d www.example.com-config/etc/letsencrypt/config.ini-agree-tos 正在检查新版本。。。 正在请求根权限以运行letsencrypt。。。 sudo/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

重要提示: -恭喜你!您的证书和链已保存在 /etc/letsencrypt/live/example.com/fullchain.pem。你的证书会 于2016年7月17日到期。要在中获取证书的新版本,请执行以下操作: 将来,只需运行,让我们再次加密。 -如果你喜欢让我们加密,请考虑支持我们的工作:

向ISRG捐款/让我们加密:
捐赠给EFF:

结果是Drupal的.htaccess文件不允许访问隐藏的文件。我临时将.htaccess文件重命名为.temphtaccess,授权生效

/opt/letsencrypt/letsencrypt auto certonly-webroot-w/var/www/html/myroot-d example.com-d www.example.com-config/etc/letsencrypt/config.ini-agree-tos 正在检查新版本。。。 正在请求根权限以运行letsencrypt。。。 sudo/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

重要提示: -恭喜你!您的证书和链已保存在 /etc/letsencrypt/live/example.com/fullchain.pem。你的证书会 于2016年7月17日到期。要在中获取证书的新版本,请执行以下操作: 将来,只需运行,让我们再次加密。 -如果你喜欢让我们加密,请考虑支持我们的工作:

向ISRG捐款/让我们加密:
捐赠给EFF:

如何配置让我们在Drupal上加密

为了使您的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)$">
通过此行交换:

<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)$">
RewriteRule "(^|/)\." - [F]
RewriteRule "(^|/)\.(?!well-known)" - [F]
资料来源:
如何配置让我们在Drupal上加密

为了使您的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)$">
通过此行交换:

<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)$">
RewriteRule "(^|/)\." - [F]
RewriteRule "(^|/)\.(?!well-known)" - [F]
资料来源: