Apache 如何使用Acquia平台配置SimpleSAMLphp?

Apache 如何使用Acquia平台配置SimpleSAMLphp?,apache,drupal-8,simplesamlphp,acquia,Apache,Drupal 8,Simplesamlphp,Acquia,我正在按照Acquia网站上关于配置SimpleSAMLphp的说明进行操作,但文档似乎不是很精确。在他们的文档中,它说运行以下命令来安装SimpleSAMLphp库 cd docroot; ln -s ../simplesamlphp/www simplesaml 要安装安装simplesamlphp_auth Drupal模块,他们链接到simplesamlphp身份验证页面。在SimpleSAMLphp安装中,它链接到SimpleSAMLphp安装和配置页面。然而,本页中的说明看起来就像

我正在按照Acquia网站上关于配置SimpleSAMLphp的说明进行操作,但文档似乎不是很精确。在他们的文档中,它说运行以下命令来安装SimpleSAMLphp库

cd docroot; ln -s ../simplesamlphp/www simplesaml
要安装安装simplesamlphp_auth Drupal模块,他们链接到simplesamlphp身份验证页面。在SimpleSAMLphp安装中,它链接到SimpleSAMLphp安装和配置页面。然而,本页中的说明看起来就像我在Acquia文档的第二步中所做的一样。它建议在var文件夹中提取simplesamlphp-1.x.y,而不是在docroot旁边提取simplesamlphp-1.x.y

现在,当我阅读了Acquia文档中的说明并尝试访问simplesaml后,我得到了以下错误:

禁止 您没有在此服务器上访问/simplesaml/的权限。

所以我找到了这个线程,它讨论了错误,看起来像是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>

服务器管理员userName@mywebsite.com
DocumentRoot“/用户/用户名/站点/Drupalites/docroot”
ServerName drupalites.local
ServerAlias Drupalites.local
ErrorLog“日志/Drupalites-error_日志”
自定义日志“日志/Drupalites-access\u日志”通用
选项索引如下SYMLINKS包括ExecCGI
允许超越所有
要求所有授权
别名/simplesaml simplesamlphp/www
要求所有授权
然而,我仍然得到同样的错误

禁止的

您没有在此服务器上访问/simplesaml/的权限


所以,问题是,我是否以错误的方式安装SimpleSAMLphp?第二,如果不是,我错在哪里?第三,如何解决此错误并重新回到正轨?我还发现了这个文档,它讨论了在Aquia的平台上设置SimpleSAMLphp,但它与我上面列出的其他文档不太一致。所以,我不确定我应该遵循哪一条。非常感谢您的任何建议。

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

RewriteCond %{REQUEST_URI} !^/simplesaml

使用@realgt-answer更准确地说:

  # 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]
此链接中提供了以下内容: