0

我正在按照 Acquia 网站https://docs.acquia.com/articles/using-simplesamlphp-acquia-cloud-site上关于配置 SimpleSAMLphp 的说明进行操作,但似乎文档不是很精确。在他们的文档中,它说运行以下命令来安装 SimpleSAMLphp 库。

cd docroot; ln -s ../simplesamlphp/www simplesaml

并安装安装 simplesamlphp_auth Drupal 模块,他们链接到simpleSAMLphp 身份验证页面,https: //www.drupal.org/project/simplesamlphp_auth 。在SimpleSAMLphp 安装中,它链接到SimpleSAMLphp 安装和配置页面,https: //simplesamlphp.org/docs/stable/simplesamlphp-install 。但是,此页面中的说明看起来就像我在 Acquia 文档的第二步中所做的一样。建议不要将 simplesamlphp-1.xy 与 docroot 一起提取,而是将其提取到 var 文件夹中。

现在,一旦我浏览了 Acquia 文档的说明并尝试访问 simplesaml,https://mywebsite.dd:8443/simplesaml/,我收到以下错误:

禁止 您无权访问此服务器上的 /simplesaml/。

所以我发现了这个线程,在 Apache 升级后为 simplesaml 获取 403 禁止错误,它谈到了类似于SimpleSAMLphp 安装和配置指令中的步骤 6 的错误。所以我去了 /Applications/DevDesktop/apache/conf/extra/httpd-vhosts.conf 并配置了以下内容:

<VirtualHost *:8083>
     ServerAdmin userName@mywebsite.com
     DocumentRoot "/Users/userName/sites/drupalsites/docroot"
     ServerName drupalsites.local
     ServerAlias drupalsites.local
     ErrorLog "logs/drupalsites-error_log"
     CustomLog "logs/drupalsites-access_log" common
     <Directory "/Users/userName/sites/drupalsites/docroot">
         Options Indexes FollowSymLinks Includes ExecCGI
         AllowOverride All
         Require all granted
     </Directory>

     Alias /simplesaml simplesamlphp/www

    <Directory "/Users/userName/sites/drupalsites/simplesamlphp/www">
         Require all granted
     </Directory>

 </VirtualHost>

但是,我仍然遇到同样的错误。

禁止的

您无权访问此服务器上的 /simplesaml/。

那么,问题是,我是否以错误的方式安装 SimpleSAMLphp?其次,如果不是,我哪里做错了?第三,如何解决此错误并重新回到正轨?我还找到了这个文档https://www.chapterthree.com/blog/how-to-configure-simplesamlphp-for-drupal-8-on-acquia,它谈到了在 Aquia 的平台上设置 SimpleSAMLphp 但它不是很与我上面列出的其他文档一致。所以,我不确定我应该遵循哪个。任何建议都非常感谢。

4

2 回答 2

1

尝试将此添加到您的 docroot/.htaccess

RewriteCond %{REQUEST_URI} !^/simplesaml
于 2017-10-18T19:02:15.530 回答
0

更准确地说,@realgt 答案:

  # Copy and adapt this rule to directly execute PHP files in contributed or
  # custom modules or to run another PHP application in the same directory.
  RewriteCond %{REQUEST_URI} !/core/modules/statistics/statistics.php$
+ # Allow access to simplesaml paths
+ RewriteCond %{REQUEST_URI} !^/simplesaml
  # Deny access to any other PHP files that do not match the rules above.
  RewriteRule "^.+/.*\.php$" - [F]

此链接提供: https ://www.chapterthree.com/blog/how-to-configure-simplesamlphp-for-drupal-8-on-acquia

于 2018-03-29T10:45:48.063 回答