我到处寻找答案,但没有成功。
我在我的OSX Web服务器上安装了PHP。 当我访问 myserver.com/test.php 时,一切都很完美。
但是,我有一个受 mod_shib 和 shibd 保护的子目录,名为/shibboleth/
当我将完全相同的测试.php文件放入/shibboleth/时,它会被提供回浏览器而不是解释。 我已经搞砸了一百万种 AddType 和 AddHandler 的组合;我已经检查了我正在使用
这是我的httpd.conf文件的相关部分:
<VirtualHost *:443>
SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
ServerName jeesty.homeip.net
DocumentRoot "/Library/WebServer/Safe"
DirectoryIndex index.html index.php
DefaultType text/plain
AddType application/x-httpd-php .php
AddHandler application/x-httpd-php .php
<Directory "/Library/WebServer/Safe/">
DirectoryIndex index.html index.php
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
php_admin_flag engine on
</Directory>
<Location /shibboleth/>
SetHandler shib
AuthType shibboleth
ShibRequestSetting requireSession 1
Require valid-user
php_admin_flag engine on
</Location>
</VirtualHost>
如果目录实际上是/shibboleth
,那么它在/Library/WebServer
的文档根目录之外,因此不会继承httpd.conf
其他地方声明的一堆重要的配置指令。